First off, you have to distinguish between God, the Son, and God, the Father. Up until after Jesus death and resurrection and ascension back to the position he originally had with his Father before anything was (ever created or came to be) With the very first thing created, God, the Son lost the full omniscience he had with his Father at that time, and went from full omniscience to partial omniscience, he was still more omniscient than any other, except for the Father himself, but he was no longer not totally, fully omniscient... He lost that when the first thing was created, and did not get it back, until after his death, resurrection, and ascension back to whence he came, his original position with the Father before anything was made...
God, the Son, as our God YHWH in the OT, Jesus Christ, the God-Man in the NT was more omniscient than any other, except the Father himself, he could predestine and predict and see ahead in many things, but not all things then, at that time, until he went back to where he was before (anything was made)...
Imagine a deck of cards, To The Father, all of the cards are the same, all aces of spades in a game of spades, to the Son, all red cards are the same, and all black cards are the same, and he can play red or else black, only one real choice... But, to us, and from our perspective, all 52 cards are all different and it seems their is a myriad of choices, when the choices only exist due to our ignorance or what we don't know... Only the Father alone knowing all, and the Son also but only before creation and after his death, resurrection and ascension... And not the time in between...
That being said, you have to know when those scriptures are talking about God, the Father, or God the Son, or the Lord...
The Father has set everyone's course and path, even God, the Son, our God's path as well... Knowing who/what/when/how each one is going to be inclined to be like ahead of time, making/creating or bringing into existence, a third to be bad eggs, and two thirds good ones, were not here to make the choice(s) but to be made to understand why we made the choices that we did, and what separates the ones who chose well, from the ones who did not choose so well, but, only in the judgment, after we die, not before or until then...
Pharaoh's heart was already inclined toward disobedience and evil, God just took advantage of what he was already inclined to be like, for his glory, honor, and greater good for his people in the end, and that is what he uses all peoples hearts who are inclined toward evil for, for his glory and honor, and the greater good of his people ultimately, in the end... One day, we'll know the why and how and what (distinguishes or separates us from them) one day, in the judgement we'll know... We'll all know, even the wicked ones, who's (spirits) in and with them, will have to stay here, and never transcend, but will spend eternity here in hell, and never, ever go to heaven, continually recycled in a evil sinful wicked system, and in wicked sinful men, forever...
God Bless!