How can an all-knowing God "repent" of something, as mentioned in Bible verses such as (Genesis 6:6) and (Jonah 3:10, etc)? How can he change his mind about something if he's supposed to be able to see into the future and know everything beforehand like the Bible says?
Known unto God are all his works from the beginning of the world.
Short answer: He doesn't. 'Repent' means to change, and God doesn't change in any way, ever (Malachai 3:6, 1st Samuel 15:29, Numbers 23:19). In fact, James said he doesn't experience even a shadow's worth of change:
Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning.
So who does the changing? WE do. WE change. WE repent. And when we do, God's immutable laws react differently towards us, either for peace or destruction. When we start drawing near destructive sin we start to destroy ourselves. When we straighten up and pull away from sin we stop destroying ourselves. Think of it as a fire. When we pull our hands out of a fire the fire "repents" from being a consuming fire and becomes merely a warming fire, which no longer burns us, but benefits us. It's reflective of OUR repentance.
When the Bible says that God repented of destroying a certain group of people, such as in (Jonah 3:10), it simply means that THEY straightened up, got out of sin and were no longer subject to the judgement that eventually visits all sin (Numbers 32:23).
There is a very good reason God never changes his laws of punishment: It's so he never has to change his laws of BLESSINGS for those that obey him. That's why he says in (Malachai 3:6) "For I am the Lord, I change NOT; therefore ye sons of Jacob are NOT consumed." His blessings will endure for those that love him forever and ever without change.
Sin is not a bunch of arbitrary "thou shalt nots" as Atheists would love to believe, either. Sin is any destructive urge that Satan, whose powers are that of beauty (Ezekiel 28: 13-15), deception (John 8:44 and 2nd Corinthians 4:3-4) and death (Hebrews 2:14), has made attractive, which is why things like lust, greed, violence, vengeance, pride, laziness, etc, all feel good at first, and then lead to disaster. To read more about what sin truly is, please read the article, "Hell and sin are not man-made concepts!"