hero's journey
The screenwritng.
Basically, it works in three stages and models the enter and exit of the hero into a special world.
- Departure: The hero is living in the ordinary world, and gets a call to go on an adventure. This could be self-brought or he could initially refuse, and a mentor figure convinces him to follow the call.
- Initiation: The hero enters the Special World, and must face a series of difficult tasks culminating in the climax. The hero puts into practice what he's learnt during the course of the adventure. He might get a reward for his action, sword, power, or "friends along the way"
- Return: The hero return to the normal world, but is now a changed person.
This structure has been replicated thousands of times, and every time I read about I find yet another story fits the mold perfectly. I guess something about the Special World lends itself well to creating stories.
Dan Harmon later created a different tool, based on the hero's journey, called the story circle which hit a lot of the same notes.

The Dan Harmon version I feel is more self-oriented. The character wants something, and so they enter an unfamiliar situation to do the thing (initiation).
In Rick and Morty they literally enter Special Worlds, which is fitting.
Inspired by this pattern, I concieved of the programmer hero's journey.