Bare nouns starting a sentence in Spanish are not ungrammatical. They are however restricted to specific circumstances (leaving aside poetry and other registers where one has more freedom to move things around).
Most simple noun phrases begininning a sentence must have an article (or a possesive, or a demonstrative) because bare nouns cannot be used in Spanish in the same way as in English. So if you want to say something like "Pets are expensive to maintain", you cannot say
❌ “Mascotas son caras de mantener.”
You need the definite article:
“Las mascotas son caras de mantener.”
In sentences like your example the subject goes at the end: “Aquí se venden coches” (or just leave out aquí, since it's obvious). This probably has an explanation in terms of the relationship between syntax and semantics of the passive. The main thing is that the subject is not the topic or theme of the sentence.
You can use a bare noun in a general statement if the noun is an object of the verb, but in this case the normal position is after the verb, as you know:
“Es caro mantener mascotas.” ("It's expensive to maintain pets.")
Since in Spanish you can topicalize (make it the topic of the sentence) almost anything by moving it to the beginning, it's possible to move such a general object to the front. This is often done with contrastive purposes, i.e. when you need to emphasize the difference between alternatives. Suppose you get into an electronics shop and say you want to buy a tablet, but the shop only sells smartphones; then the shopkeeper can say to you:
“Tablets no vendemos. Teléfonos le puedo mostrar si quiere.”
That is, literally: "Tablets we don't sell. Phones I can show you if you want."
This works also when there's no explicit alternative but still you want to emphasize the topic. For example, suppose you made pizza for your friend, and your friend comments you haven't put olives on top. Then you could reply:
Aceitunas nunca les pongo a las pizzas. ("Olives I never put on pizzas.")
The phrase would be equally fine if you'd left the word aceitunas in its usual place, after the verb, but in this case it somehow emphasizes that it's olives, not something else, that you usually leave out.