Forgetting 'random' for the time being -- if the brain's random we might as well pack up and go home --
Lavengro
What everyone is forgetting is that random is not an either/or condition. In fact rationality might be defined as reasonable responses to random events that occur both internally to the brain and externally as in spilled cumin in the curry. (Should I eat it or spit it out?) The brain has sophisticated feedback that evaluates odd inputs either internal or external to see if it is important to current events in the mind. That random linear flash of reflected sunlight might be nothing. In the vicinity of a passing car the brain will ignore it. But in a crowd of people the brain might decide to direct the full attention of the mind to look for danger associated with such linear flashes. Many millions of years of separating out dangerous random signals from similar random signals that are normal patterns in the environment make dealing with the randomness of the environment a critical survival trait.
The brain's internal random juxtapositions of thought patterns is the essence of human creativity and free will. A vaguely remembered dream of a snake biting its tail juxtaposed to a vexing structural chemical problem may be responsible for modern organic chemistry. One can play the determinism game all night long and say August Kekulé had the dream because of a logical train of subconscious thought on his problem, but the waking correlation of the dream to the problem at hand seems to be deterministically improbable to the point of ridiculousness. The mind might be envisioned as a laser cavity of random thought processes that reinforce to produce meaningful waves or flow past each other without hooking up at that time. Sooner or later less important thought processes are relegated to the memory for future use as needed, (don't ask me how the mind knows they are needed, or how it retrieves them from the memory, I am not that smart.) But I do know that the mind is extremely versatile in processing that endless stream of data.