The problem with the first question is that it doesn't begin to address the nature of free choice under God's sovereignty. A strictly correct, but woefully incomplete, reply would be "the first", ie that Pharaoh freely chose, and that God had planned that he should. That leaves a lot of metaphysical options open, a lot of mystery, and yet agrees with what Scripture implies about human choice in relation to God's sovereignty, and that's where I take my lead from. In this particular case, it states that God hardened Pharaoh's heart, and yet that Pharaoh was freely accountable for his actions.
A number of the problems are reduced if we don't buy into the post-Renaissance definition of free-choice as "completely autonomous and completely arbitrary": character, circumstances and other things all constrain the freedom of the will.
The question of "randomness" in nature, however, is simpler, in that once divorced from mere epistemology, it can only mean that things happen without cause, and therefore without any intelligibility whatsoever to God or man. Constrain chance by a probability curve, and it's no longer random, but simply of a real but unknown cause - and God knows all things, and sustains all things, and governs all things for good.
So his purpose for randomness beyond his knowledge and sustaining and governance would be what, exactly? Would you rather fly in a plane engineered entirely by expertise, or one in which 5%, or 50% of the decision nodes in the design were generated randomly? But it's logically impossible to create randomness anyway, because by definition it's the absence of organisation, and creation is by definition organisation.
I too have heard it said that quantum events play a role at molecular scales for individual mutations. However, I haven't heard anyone actually present any evidence that it's so, least of all on the Solid Scientific Consensus platform of Biologos. If it were so, then surely one would expect any directionality to be statistically non-existent over the course of time. I understand from the study of mutations that the same ones tend to occur over and over again, which is why scarcely any useful new strains came out of decades of mutation experiments. In other words, the mutations aren't actually ontologically random at all - they form patterns.
And if one did manage to show that "random" quantum events were a significant influence on the direction evolution has taken, you'd be back to the truth that their randomness is formally indistinguishable from choice: there is no known cause of individual quantum events within nature, which most logically means the cause is outside nature - R J Russell's "quantum tweaking" rides again, suggesting that God was directing evolution all along, since nature wasn't.
But where is the scientific evidence that ontological randomness exists in the universe anyway? If so, where is it, and how is it distinguished from divine or creaturely choice? And where is the theological evidence that God has ever made unintelligibility a creative force?