I ate the sandwich.
I the sandwich ate.
Ate the sandwich I.
Ate I the sandwich.
The sandwich I ate.
The sandwich ate I.
In modern English, the most common sentence pattern is subject (S), verb (V), object (O), or I (S) ate (V) the sandwich (O). But as this example shows, most common does not mean only possible, and while some of these constructions (“Ate the sandwich I”) are pretty unusual, they are nonetheless grammatically correct.
Unusual word order in a sentence is called inversion. Shakespeare used inversion to create specific dramatic and poetic effects. Inversion can be used to emphasize key words, to create specific poetic rhythms, to give a character a specific speech pattern (think Polonius, for example), or for a variety of other purposes.
Experienced readers “re-order” the words to understand the sentence. They locate the subject and the verb and “re-write” the sentence for clarity (“Ate the sandwich I” is quickly changed to “I ate the sandwich”).