At least according to my observations, they randomly attack anything that comes within a certain distance of them.
A lot of my domestic animal thralls tore each other to pieces, eventually dying when they were decapitated. (Or possibly because they broke
every single body part of the offending thrall.)
Fort got wiped by the remaining thrall horse though, so no ‼SCIENCE‼ yet on whether thrall corpses can reanimate as zombie zombies or not.
(On a related note: Has anybody killed a zombie more than three times? I've had a "wolverine corpse corpse" lying about... Will it become a wolverine [corpse]n after the nth death?)
For the infinite respawners, I posit
two three possible suggestions:
magma dump (or atom smash) every non-used body part with extreme prejudice
or
the Cave-In Pit o' Annihilation™:
,,000000
Z,=== s0
Z, + 000
Z, # ,,,
,,,,,,,,
, = ground
= empty space
= = bridge (retracts) (connected to a lever a safe distance away, obviously)
# = floor grate
Z = recycled post-organic ‼Fun‼
s = bait (ideally, pitted from above)
0 = wall preventing acces to bait from the sides
+ = after PULLING THE LEVER!, build floor tile here. If at first you don't succeed, build another.
I figure that would do it for non-flyers, no?
Although I fear that the pitted returnees may freak out the floor builder...
[edit] Alternative #4: find out if obsidian and ice still are the dwarf's best friends.