In honor of its 25th anniversary, Nerdist has a lovely oral history of Star Trek: The Next Generation's "The Inner Light," the episode where Captain Picard lives an entire life in the span of a few moments.
The oral history comes from the episode's writer, Morgan Gendel, who explains:
So my original concept was, what if the Enterprise comes across something very strange, like a probe, and next thing you know, Picard, Riker and Ro Laren would find themselves on another planet. And my concept was an ancient, yet futuristic, version of the Fuji Blimp, that could essentially advertise TV commercials right into your brain that would make you feel like you're living an experience. A lot of people thought that the impetus of this episode was Picard's whole 'the life not taken' emotional journey, but in this instance, the 'tech' part of the story came first, before the emotional arc of Picard. Since then we've had a lot of theater of the mind movies, like The Matrix, but at the time there wasn't a whole lot of that.
You can read the full interview, which includes Gendel's secret mission to "Kirk-ize" Captain Picard and the sequel episode that never was, over on Nerdist.