In the Hebrew, there is a connection between evil and doubt, as exampled in the meaning name Amalech. Those he addresses by these words are those that claimed to have been doing works in His Name all along, but it seems obvious to me that they must not have been doing anything of the sort.Jesus says He never knew them. The context I have been told heavily suggests intimate relationship. Not one of physical intimacy.
So God knowing some and not others in foreknowledge has to do with salvation, because those He never knew He calls evil doers.
You are suggesting His omniscience means He does not know everything is a possibility. Makes no sense.
And I have no idea how you've come to that conclusion.