Among the Aztecs, the law held nobles to a higher standard than commoners. A publicly drunk commoner might just get carried home, but a publicly drunk noble faced serious punishment. In one of my D&D worlds, the elves frequently punished wrong-doers by turning them into sheep, goats, or other useful animals. During the sentence, the transformed criminal would be milked, sheered, or whatever and the produce or income from that would be given to the wronged party.
This a fascinating subject that I love! Not only the topic of what laws and punishments exist but also the state's ability or willingness to actually enforce them! Also, the player(s) starting under arrest/in prison is a classic that I will wantonly abuse forever and ever because it's not a crime and you can't stop me!
Keep in mind that incarceration is expensive and usually not preferred unless you can get the incarcerated to work for you. More common punishments, if draconian make repeat offenses unlikely or impossible. (E.x, loose a hand if you commit theft ) In my setting, the capital city punishes vagrantcy with conscription. And if their are no wars to fight, you'll end up fighting in the coliseum. Also keep in mind who enforces the law, how they operate. E.x In that same city, the guards will have permanent/semi permanent stations at pawn shops and trading houses. Mostly to deture theft, but also to prevent shop owners from acting as a fence.
I have an empire with laws regarding the length of one's hair based on social class. Originally a way of identifying slaves, as they are tattooed on the nape of the neck. It became a social marker, and extremely long hair a privilege of the noble class or royalty. Only one of my countries has specific laws regarding the use of magic, however the rest have some prejudice, and often look the other way when "witch hunters" come through.
There might be laws that govern the use of Magic, but Magic can be used to uphold the Law or punish those who break it. The Geas Spell from D&D for instance might be used make criminals follow the law against their will, or to send pcs on a Quest. (I also like the Idea of a town or region being under a similar effect that prevents anyone from comitting a crime, the options are endless)