When memorizing a sentence or a full story: then, how does the brain encode the order of the words of the sentence or the sentences in the story?
Similar to your other question, this one reduces to "what are the neural mechanisms behind language?", which is very much a work in progress.
The only neural model of language that I currently know of is the Semantic Pointer Architecture (SPA), which is largely theoretical and only has some super basic examples.
Basically, the SPA represents language as vector manipulation. The vectors are represented in neurons using the Neural Engineering Framework.
For more details on how this is done, check out "How to Build a Brain" by Chris Eliasmith and the work by Peter Blouw who is trying to solve part of this problem with his PhD thesis.