the more connect-the-dot drawings you do, the more likely you are to recognize the design early on. Same with literature. Part of pattern recognition is talent, but a whole lot of it is practice: if you read enough and give what you read enough thought, you begin to see patterns, archetypes, recurrences.
This is definitely true with writing as well. Honestly, with every skill. You could say, for example, “__ isn’t a talent, it’s a practice” and I’d argue the sentence can apply to anything.