Shamus Young talks about arresting PCs.
He makes some good points. My own solution was somewhat different.
I promote immersion. I find that when players have characters that are woven into the setting they are less apt to do things just because they can. They view the contacts, connections, and resources they have built up just as valuable as magic items and treasure.
I enhanced the immersion by running a campaign where the players played the City-Guard. One of the things they had to deal with was unruly adventuring parties that were significantly stronger then they were. They came up with a variety of solutions, mostly involving teamwork. I used these solutions in subsequent campaigns and the City Guard had a lot more respect after that.
If you are having trouble with an aspect of your campaign setting whether it is how wizards deal with each other, city guards, thieves, clerics, etc; I recommend running a theme campaign where the players play just one type of character and let them solve it for you.
It doesn't have to result in everyone playing the same class. I ran a thief campaign where one of the players insisted on playing a wizard. Because of that we came up how magic users are involved with the Thief guild.
Most of my fantasy campaigns are run using GURPS. Some of this will work with D&D 4th, 3.X.
For the City Guard campaign the players developed the idea of the knight killer crossbow. It is a high strength, high damage crossbow. Before each patrol they crank them up and engage a lock to keep the bow string from being triggered. If they get into a serious fight they release the lock, load the crossbow and fire them at their most dangerous foe. There is no time to crank them up again so they drop them and go in. Most patrols will have half their number equipped.
The result is a devastating volley particularly if their are 5 or more guards firing. The odds that one or two will he even the most skilled PC. The crossbow do so much damage that the result is a downed or dead character. Just threat of being hit by one of those bolts usually is enough to calm the most agitated of characters.
Because of the high maintenance, specialized design of these bows. PCs don't try carry them around. Some PCs will use a more manageable lower strength crossbow in the same way, but the knight killers remain used by the various guard units.
The other trick was the Guard stick. In each barrack or post there are sets of two thin dowel rods about a foot long. When a patrol goes out they take one of the pair. If the patrol needs help they will snap their rod causing the corresponding rod at the barrack to snap. Since the patrol walk a known route. The reserve follows the route until they find the original patrol unit.
If the situation escalates a system of rods allows the City-Guard in my campaign to summon the entire force to a situation within an hour. The barracks will snap their rod which summon the reserve from the main headquarter. There are rods used to signal a extreme situation where all the off duty as well as on duty guard will be called up.
This resulted from a situation in the City Guard campaign where a rouge adventuring party was able to escape because they were able to defeat individual patrols separately before runners could reach the barracks. The systems of linked rods allow the message of "Help in I am trouble send reinforcement" to be conveyed much quicker.
If the guard are going into a known situation, like a raid on a thieves nest. Then multiple rods will be issued to ensure that at least one will be broken if trouble arises.
Concerning wizards in the thief campaign, my groups had ran a game where the players were all mages. So we had a good idea of how wizardry worked in general in my setting and unfortunately what we established meant that the main culture of wizards would not be working with thieves in any capacity.
However we did established that there was a sub group of hedge wizards, and renegades hunted by the wizard's guild. So we decided that it was with these guys the thieves guild dealt with. The skills sought most often where healing potions, items or spells that buffed up the character, and fogging.
What is fogging? Well the big problem for most magic system and thieves is that there are divination spells. This problem exists in most RPGs to a greater or lesser degree. The basic issues that the wealthiest of individual have the resources to get a divination casted to tell them the identity of anybody who stole a high value object. It make take a long time or a short time but in most fantasy RPGs the identify of the thief will be eventually uncovered through magic.
Foggers are wizards, usually renegades, working with the thieves guild. They cast anti-divination spells so that high value objects may be stolen. Just like there is a hierarchy of thieves there is a hierarchy of foggers. The highest status goes to those foggers that can foil the divination of wizards hired by the King/Emperor/Overlord's court.