About the Town Pets
Solution 1:
Pets function just like town NPCs, including counting towards the limit needed for a pylon to function. If they die, a random pet of the same type will show up, and they can be assigned to specific homes in the same manner as an NPC (although of course they can share a home with an NPC).