How can we have free will if God knows what we're going to do before we do it?

Off topic but, does God have a penis? In the bible, it says man was created in His image. If he does have one, what does he do with it? Why would he have one if he can't reproduce? I'm not trying to insult anybody, I'm just curious.