Can a zombie despawn if it is holding an item or has an Armour piece on their body within the spawn chunks?
As others posted, an armor piece the zombie picked up (didn't spawn with it naturally) will prevent the zombie from despawning.
Important caveat though: if said armor piece is a helmet, and the zombie is exposed to sunlight, the helmet takes continuous damage and will break after a short time, and the zombie will despawn or burn to death right after that happens. That's why if you want to keep the zombie sun-proof and non-despawning, the optimal item is a carved pumpkin; you can also use player and mob heads, say, the dragon heads from end ships - these items have no durability and as such they don't get damaged by sunlight when worn by undead mobs.
Theoretically, any mob with armor or holding an object within the spawn chunks will never despawn, due to the spawn chunks being in memory at all time.
If you want a zombie to not despawn, you can throw a piece of armor, or any item, and if the zombie is able to pick the item, it will not despawn even if the zombie isn't in the spawnchunks.
You can also give the zombie a name with a namtag, that'll work too.