I guess I'll just dump what I know about how to build a monster trap (not a tier 5 spawn, but the old school vanilla stuff).
Must be dark, light level 7 or less.
Mobs spawn on opaque blocks (dirt, gravel, sand, stone, etc...) but not on transparent blocks (glass, chests, cake, half slabs, xycraft stuff).
Spiders need 2x2, some say 3x3 area to spawn in.
They will not spawn less than 23 blocks from you in a sphere.
They will spawn up to 128 blocks from you.
They will despawn if 129 blocks from you or if they are closer they will despawn if they don't move around for x number of seconds. They have to be like 35-40 blocks from you for that to apply. Close enemies can be stationary forever and dont despawn to that rule.
They will not spawn if the world number of enemy mobs is exceeded. Which means if there can be 100 enemies in the world, you can't make a 101th enemy spawn. Which also means if you have other people on the same server, their enemies count against your enemies. Two mob traps will compete with one another for enemy spawns.
This is to say nothing for lighting your caves and such. I usually just build way up in the sky and that solves that problem.
Zombies holding objects they pick up do not despawn. They are identical to animals and npc's in that they will always be there until killed, someone sets the difficulty to peaceful, or they burn up in the sun (die).
---
Soul shards and those cages should follow the rules for spawners for the most part. They work 16 blocks or closer to a player. I've seen videos of tier 5 spawners working farther than that from the player - so this mechanic may be different or changed.
The maximum enemy limit is ignored by spawners. The rules about despawning are still in effect. Which is to say, they will vanish if too far from the player.
A fun thing to try to test some of this stuff is to find a desert, fly up high above it and watch as enemies spawn in and almost immediately despawn. Come closer and closer to the ground and you'll eventually see an ever widening circle where they spawn and stay. Then after a period of non-movement, they dissappear.