I remember a thread here in the SciFi Stack Exchange about the longest sci-fi series. Someone mention a standalone Heinlein book that seemed to somehow include all other books ever written in its story. Does anybody know which book is that?
Heinlein's Number of the Beast features a vehicle that can travel through space and time and to fictional worlds such as Oz and Barsoom.
For the sake of completeness (although I think accepted answer The Number of the Beast is the most all-encompassing of Heinlein's "multiverse" novels), I'll throw in The Cat Who Walks Through Walls.
It weaves together characters and storylines from a variety of other Heinlein novels, most prominently The Moon Is A Harsh Mistress and Time Enough For Love.
In spirit and tone, though, it functions as a sort of sequel to The Number of the Beast. Not for reasons of any narrative continuity between the two, but because each is a freewheeling parodic adventure within the conventions of a particular genre. Where Beast was primarily a romp through the conventions of pulp sci-fi. The Cat is Heinlein at play with the tropes of hard-boiled detective fiction. Flawed tough-guy hero, mysterious femme fatale, inexplicable murder to open the action - it's all swiped from the noir playbook.
Finally, the spacetime-travelling fictional-world-visiting Gay Deceiver from Beast also makes a reappearance in To Sail Beyond The Sunset, but there it's more of a walk-on cameo at the end.
I’m not sure whether this is what you’re looking for, but Wikipedia says,
For Us, the Living contains many foreshadowings of Heinlein's later writings. The 2086 of the book has a significant resemblance to both Beyond This Horizon and the Earth of Methuselah’s Children. Other familiar elements include the "Covenant" from "Coventry", a variation on Starship Troopers’ suffrage only through federal service, rolling roads and a cat as a minor character. … (and more)
… and there are similar remarks in the introduction to the book.
It sounds like they were talking about his collection The Past Through Tomororow. It's not all the books he's ever written, but it's a really good overview of his future history. The stories are presented in chronological order relative to one another.