Genesis was written the same as the rest of the law...and its not rhetorical.
Not all of the Torah or Tanakh can be read literal. Take these verses for example, some have had words added in on English translations to clarify them to our understanding, so I am using a literal translation from the Hebrew (Artscroll version). I highlighted the parts that clearly are metaphor or to be read rhetorically:
Isaiah 40: 6 A voice says, "Call!" and it says, "What shall I call?"
"All flesh is grass, and all its kindness is like the blossom of the field...
Isaiah 40:10 Behold the Lord God shall come with a strong [hand], and
His arm rules for Him; behold His reward is with Him, and His recompense is before Him.
Not to mention verses with direct instructions that would contradict one another if we don't read them with a critical mind (NASB):
Exodus 20:4 “You shall not make for yourself an idol, or any likeness of what is in heaven above or on the earth beneath, or in the water under the earth.
Then the Hebrews were told a few chapters later in directions on the Ark to make images of angels:
Exodus 25:18-22 You shall make two cherubim of gold; make them of hammered work at the two ends of the atoning cover. 19 Make one cherub at one end and one cherub at the other end; you shall make the cherubim
of one piece with the atoning cover at its two ends. 20 And the cherubim shall have
their wings spread upward, covering the atoning cover with their wings and facing one another; the faces of the cherubim are to be
turned toward the atoning cover. 21 Then you shall put the atoning cover on top of the ark, and in the ark you shall put the testimony which I will give to you. 22 There I will meet with you; and from above the atoning cover, from between the two cherubim which are upon the ark of the testimony, I will speak to you about every commandment that I will give you for the sons of Israel.