Since I had literally hundreds of mostly unwanted random creatures in cages for various reasons, I at one point decided to make an effort to make a setup that would pop them out of the cage via a distant lever to greet invading armies. This was, in the end, a totally useless endeavor. The logical place for the cages was inside the water trap, where anything unwelcome was marked for death anyway, and it was a huge hassle every time to set it up, and there was in general no useful effect in any capacity except to add some additional steps before everything drowned. It was sometimes entertaining, of course, which probably is why I kept doing it.
(I also, for some ridiculous reason, became convinced at one point that I could use bugbats in pop-open cages to induce invading armies into chasing the bugbats around up on surface level, so I could manipulate them into going where I wanted them to be. This was incredibly time-consuming to set up, and never worked, not even a little bit, even though I tried it several times. All it did was spread more bugbats around and introduce them in new places. For some reason, though, I kept being convinced that it would work and kept trying. I think by then I was self-deluded by the half-mad desire to make worthwhile the massive sunk costs that had been invested, against my will, into the goddamned bugbats, back before the point I finally decided to exterminate them once and for all.)
So as I said, it was a complete waste of time. There was, however, one of these surprise cage-openings that had an interesting product.
I had captured some kind of powerful enchantress and her assistants, all guilty of some offense against my fortress, and left them in cages for quite some time before deciding that they would make a good pop-out-and-greet-the-goblins squad. I installed them, and when the time came, I popped them out to share a hallway with a forgotten beast, a giant spider, some random cavern riffraff, and a small band of attacking goblins, just to see what would happen.
The result was fairly spectacular. A big magical fog popped into place, and it was like a fight in a Looney Tunes cartoon, all obscured with blood and chunks and spiderwebs arcing out of it periodically, and occasional glimpses of something incredibly unpleasant happening to everything inside. After a short time, the dust cleared, and the only thing that still remained that was any version of alive was:
Four zombies, aligned as friendly to the fortress.
I have no idea how this happened. Nothing that went into the melee had been friendly to the fortress, and none of it was zombies. I'm still to this day not clear on the basics of zombies, to be honest. Were they going to stay friendly? If I turned them loose on an army, would they do anything? Would they maybe turn that invasion into a hundred zombies, all friendly? Or not friendly anymore? Or would that zombie army start out friendly, but then one day turn against my now outnumbered dwarves in a mass, and form a horrifyingly vivid Shakespearean end to the entire fortress?
I had no idea the answers to these questions, and to be honest I still don't. All I knew is that they were zombies, they were friendly, and they were endearingly energetic, sometimes running around pointlessly at tremendous speed inside the water trap in random directions. I have, however, learned to be deeply paranoid about letting anything weird interact with my fortress in any way until I understand it.
I put them in a kind of separated channel / escape tunnel, spending quite a long time attempting (with eventual success) to wash them up and into it with long slow gouts of flood-water, and then locked them in, unsure of what to do with them. I left them there for quite a while, more or less forgotten, while they capered around happily and from time to time freaked me out a little when I saw them and remembered they existed.
As an experiment, I decided to allow one dwarf into the water trap, shut the door, and let one zombie out from captivity, and let them interact with each other, and just see what happened. The answer was: Nothing. Nothing at all. The dwarf wandered aimlessly, the zombie capered around and ignored him, and all was fine.
I genuinely considered just letting them run around in the fortress and be mascots, and actually left the one in the water trap to let him run around freely, sharing the space with fortress dwarves whenever they had business inside the trap, and it went fine. But I could never relax about it. I decided that that insistent voice of caution was there for a reason. I honestly don't remember for sure, but I think I found a way to kill them.
Poor little guys. I really did feel bad about being so suspicious of them; they hadn't shown even a single sign of hostility, and something about their madly pointless sprinting around really was kind of cute. But the other shoe waiting to drop was just too glaringly telegraphed.
I have never seen even a single zombie movie where it turns out at the end it was all a misunderstanding and the zombies just wanted to be friends.
Dude I wanted so badly for the bugbats to be useful
In they end, though, they just weren't.
And I have no idea about the different types of zombies; I just know they were zombies when I examined them. And I am as mystified as you are as to why they were loyal to the fortress. Maybe the enchantress was from the same civilization, sort of outwardly aligned as on the same team as my fortress, even if she had done some kind of crime against it (allegedly)? And then she raised the zombies and then everything died leaving only the zombies.
That actually makes some sense, now that I think about it, although at the time I looked at her as an enemy.