Sentences that do not contain the classic subject and predicate structure [duplicate]
Grammar is a social convention; specifically it is within linguistics, which is a social science. Grammar and syntax dictate/describe the rules for "well formed" speech (like XML rules). "Well formed" here is defined loosely as, "a native speaker should understand or nearly understand the intended message, even if they don't understand the words."
That's the basis of this joke from Spongebob (YouTube):
Mr Krabs: We've been duped!
Spongebob: Duped?!
Mr. Krabs: Bamboozled!
Spongebob: We've been smeckledorfed!
Mr. Krabs: That's not even a word and I agree with ya!
After having listed 2 synonyms for having been tricked, Spongebob invents a word, but he uses the morphology of how in modern English common verbs form the past tense with the dental suffix "-ed"; compare this with irregular preterites like "went" for "to go" (although this actually follows a conventional rule, albeit in another older language). So Mr Krabs uses the grammatical/linguistic context to assume Spongebob is listing another synonym for tricked or cheated.
As other users here have stated, literature and rhetoric can employ grammar as guidelines, but are much less bound by it than formal or business communications (perhaps an application of technicalities to an excess is epitomized in law texts and legalese).
Just be careful. I think with writing the old saying attributed to Pablo Picasso applies more than ever:
"Learn the rules like a pro, so you can break them like an artist"
With writing, breaking the rules like an artist is indeed a high discipline which could be said to manifest with something like poetry.