I was daydreaming recently about what I'd say if I sat one day on an author panel, and someone asked the classic question. But I've thought about it enough, and followed perhaps enough interesting research, and been lucky enough, to maybe partly answer the question.
A stupidly arrogant claim, eh?
The short, half answer, is: the same place dreams come from.
One clue was a fascinating documentary some years ago which mentioned an (Italian? French?) researcher's idea that the same mechanism the brain uses to form dreams is at the root of our consciousness itself, and our thought processes.
Another clue is our ability to create mental models of other people - what they're thinking, how they'll react, how they're feeling - and the discovery of mirror neurones, that let us experience the pain or joy of other people, as if whatever is happening to them is also happening to us. That all ties up with our ability to form social groups, and through that, to survive. The evolutionary pressure that drove that development is very clear. So our ability to construct models of other people, good enough to allow us to hold imaginary conversations with them, is another large piece of the puzzle: we really are very adept at creating hypothetical situations, populating them with imaginary or "real" people, and then letting them act and react with each other in our minds. That's a big part of the answer.
Another equally big part is our hyper-developed ability to see patterns; patterns in all the bits and pieces of things that make up our mental landscapes — whether they're simple geometrical shapes or complex sets of actions with causes and effects. Our brains are hungry to find patterns, to predict the future or to make sense of the world around us. Again, this developed because the ability to read a warning sign, evolutionarily speaking, has very much been a matter of literal life and death. For individuals, tribes, or whole societies. So we're also great at making connections between apparently disjoint things: whether it's an apple falling from a tree, or a dream of two snakes coiling together.
Another really powerful element in our idea creation arsenal is our unconscious. I've blogged previously about the Unconscious Thought Theory, but it's worth recapping here. Unlike our conscious mind, which is great at managing sequential lines of thought and performing logical manipulations, our brains also provide with "an" unconscious, with something like fifty separate and independent "mental processing units", that can all access all our memories and whatever it is our brains use to represent parts of thoughts (facts, idea complexes), and then form new connections.
Fifty streams of thought that are all able to match and measure and compare and select and create.
This forming of connections, I suspect, is how we construct those structures in our brains that represent our ideas.
So as well as our logical minds, we also have this powerful parallel processing thinking engine at our disposal. I've been happily and very productively using UTT since I learned of it in 2014, to solve problems and generate ideas. So I know that for me, at least, it works. Very effectively.
And if that's not enough, to this "most complex thing in the universe" (the human brain and mind), we have perhaps mankind's greatest invention: words, and language. The ability to write stuff down. When you think of it, written language is "just" the capturing of ideas in a static, black and white, two dimensional form. Frozen in time: visible for anyone to see, however far away in space or time they may be from the original writer. Which is pretty amazing.
But for a writer, the written word becomes in a real sense an extension of the brain. Once written down, the burden of having and holding the thought has been transferred out of our brain and offloaded to an outside memory screen, sitting there for us to read at a glance and add back into the melting pot of our thoughts. It frees up the mind to generate the next thought, the next piece of the idea, and holds it in a stable form that won't collapse if we're interrupted, or lost if we're distracted.
And the final piece of the puzzle, I think, is each person's "mental wealth": the Aladdin's cave of memories, experiences, sights, sounds, music, pictures, ideas, feelings, facts, tales, people, hopes, …. in our heads. I don't know the limits of the storage capacity of our brains, but I do know it's huge. And the more good and rich and interesting stuff we store away in our treasure troves, the more building blocks we have for new ideas, new stories, new inventions.
So with all that thinking capacity at our command, and all that rich source of stuff from which to create new ones, I think the question of where our ideas comes from starts to seem a lot less surprising.
It comes from the most fundamental part of what makes us human, and from all we've seen and done. Humans are imagination engines, naturally generating ideas like the sun generates warmth.
It's what we do.