Avengers: Endgame writers Christopher Markus and Stephen McFeely shared their sources for the time-travel segment of the Marvel endcap. When deciding what rules of time travel to adhere to and which ones to toss out in their own little (Marvel Cinematic) Universe, they pulled from a few obvious places and some not so obvious. They talked about their favorites in an interview with Comicbook.com.
For one, they decided to chuck the time travel tenets espoused by the first two Back to the Future films. McFeely and Markus said that they did that out of practical reasons, as tracking the ripple effects of 6 different characters would take over the entire movie.
"We went back and watched both Back to the Future and Back to the Future 2 specifically," McFeely said. "Everyone thinks that's how time travel works because that's a great movie, maybe the best of its subject — but if we were to [follow those rules], to do something in the past it's gonna screw up your future, we're going to do that six times. We would have no way to follow that. It would just be exponentially crazy town."
One time travel plot they did love was the one that runs through Harry Potter and the Prisoner of Azkaban. For those who don't remember, that movie heavily features an object called a Time Turner that allows Hermione Granger to warp time in order to take a larger course load. McFeely and Markus said they loved the way that they managed to tie in the looping timelines in an understated way.
"I do love that third Harry Potter movie, where [we see] a stone break a vase. You don't know why, but the scene's fine and it doesn't take you out of it," McFeely said. "Then when you come back around [during the time travel] and you realize that They had thrown it at themselves, I do love that."