Making more intelligent, efficient zombie npcs

Hi all, I am currently utilising a zombie npc method where I tag zombies and deliver a set of functions for each zombie separately via the same script. I’d like to ask what components would one add to their zombie npcs to make them more smarter, and less prone to breaking. An example of breaking being when the zombie keeps walking into a short obstacle (wall etc.) when it’s obviously tall enough for them, instead of rerouting and finding the next player or jumping. NPCs also tend to bundle up together which makes them way too easy to kill.