The TVTropes Trope Finder is where you can come to ask questions like "Do we have this one?" and "What's the trope about...?" Trying to rediscover a long lost show or other medium but need a little help? Head to Media Finder and try your luck there. Want to propose a new trope? You should be over at the Trope Launch Pad.
That can either be a Retcon, or Throw It In, since it wasn't originally planned.
Can be the result of Writing by the Seat of Your Pants or Ascended Fanon.
This is a lot less common than people think, though- usually its more a case of I Knew It! with an author that knew exactly what they were doing and just doesn't advertise it, or Schrödinger's Gun where a creator intentionally leaves these sort of optional future story hooks scattered throughout a work. (I love doing both to my players as a DM- I've sprung Brick Jokes on them that took most of a year to set up, and spun entire dungeons out of story hooks they showed interest in)

An author foreshadows or paves the way for something completely on accident.