Maria is indeed a stock character. Clever and cunning servants were a standard feature of Greek and Roman comedies, and they continued to be used in drama right up until Shakespeare's day and beyond. Such characters would often be portrayed as more intelligent, more clued-in, than their alleged social superiors. We see this with Maria when she fools the hapless, snobbish Malvolio with her remarkable skills as a forger.
But she's so much more than this. Maria is not just a cunning trickster; she's possessed of a rational intelligence that elevates her above the common run of stock characters. Maria is at the front and center of much that happens in the play. She is at the heart of the action, not, as would traditionally be the case with a stock character, on the periphery. Instead of reacting to events as would normally be the case, she shapes them, acting as a catalyst for a number of key plot developments.