Zanni, as much as Harlequin, is originary from Bergamo. The lower Bergamo of course, "Bergam de hüta", where all the poor come from, and he's part of that emigrant population that has to mingle into an hostile environment to survive.
Zanni means the first name "Giovanni" in the dialect of Bergamo. Giovanni is possibly the most common of all Nothern Italy names, sort of a "John Doe".
The Zanni can be recognized, with good approximation, as the matrix on which other masks were created, there have been many Zannis along the time, adapting their character to the troupe's needs, and gaining a special personality, sometimes.
Harlequin, for instance, had (especially in his first years) so much of the Zanni character, that was almost a reflection of it. In later times we also have a primo and secondo Zanni that in a certain way replicate that situation (the smart Harlequin vs the dumb Zanni).
Pulcinella, also, in the way he dresses, the typical "poor folk guy" uniform, is basically a Zanni, although developing a very personal pattern very soon.
Brighella too, shares the hunger and the way he leads his life, no real clue of what goes on, his life an improvisation after another just trying to get by.
Typical feature of the Zanni: poor, desperate, ignorant but smart in his own way, although everybody takes advantage of him. In a second period he gets his revenge, though, and outsmarts many.
He's constantly hungry, and constantly exploited, the primo Zanni smart while the second Zanni hopelessly stupid.
The Zanni defines more a kind of mask, but not a particular one, although on several occasions he gets the name of Zany Corneto.
Zanni is friend / antagonist of Harlequin, of which he shares not only the roots, but the basic needs: food and lack of nobility.