The answer, of course, is both.
For his comedies, Shakespeare relied heavily on a single theme with a simple plot that would fit well in most TV sitcoms. Many of the characters and plot devices are repeated from one play to the next, and the endings of his comedies are always completely predictable. How is it then that Shakespeare is so highly regarded?
The science fiction writer Alfred Bester once wrote:
But the truth is, the idea itself is relatively unimportant; it's the writer who develops it that makes the big difference. The identical idea would turn into totally dissimilar stories when written by different authors, which is why professionals are not quite so generous as they seem when they freely exchange ideas and suggestions. They're aware of this. It is only the amateur who worries about "his idea being stolen."
Shakespeare had the wisdom to recognize that a single subject can make a variety of portraits. The broad strokes of the comedies are the same, but it's the finer touches to the features of the characters that bring them to life. Shakespeare's elegance and artistry make otherwise mundane people intriguing and very human.
It's interesting to look at the motifs that Shakespeare used as a foundation. Among them are:
Plot
Most Shakespearean comedies begin with a pair of heros and a pair of heroines. The two pairs meet and either instantly fall in love, or an outside force goes to work to trick them into falling in love. The bulk of the play involves the lovers attempting to work around an obstacle placed by a misguided person so that they may live in bliss with their prospective mate. Eventually the obstacle is overcome, royalty arrives or asserts its presence, and the two pairs of lovers marry in a festive event that brings happiness to all, scoundrels and saints alike.
The Heros
Most of the comedies feature a pair of heros, probably because Shakespeare needed extra characters for the dialog (they are plays after all) so why not throw in another couple to enjoy the connubial atmosphere? The primary hero is usually good-hearted, noble, and witty. The secondary hero enjoys many of the same qualities, but often in a more conservative, less commanding way.
The Heroines
The female versions of the heros are above all virtuous and good. Again, one takes precedence with a more flamboyant persona or sharp tongue. One of the most remarkable features of the heroines is their proclivity to don masculine garb. In Shakespeare's day, women did not act, so it was both convenient and funny when Shakespeare's female characters dressed as men to go "undercover"; this was a frequently used plot device.
The Fool
The character with the greatest variation I call "The Fool." The Fool is marked as an outcast or laughing stock for varying reasons such as priggishness (Malvolio, Twelfth Night), stupidity (Elbow, Measure for Measure), greed (Shylock, The Merchant of Venice), or actually being a professional jester (Touchstone, As You Like It). By the end of each play The Fool's faults are forgiven so that the sour note of sympathy doesn't spoil The Wedding March.
The Royalty
The Royalty (frequently a Duke) shows his face at the beginning and end. His sole role is to be a pivot for the plot, and to use his power to give his blessing to the happy couples.
The Villain
There is no villain. Even the most dastardly character will repent by the last act, and all wrongs will be righted.
Of course to each of these rules there are exceptions, and more importantly, they don't begin to capture the poetry and wit that make them masterpieces. For that you'll have to read for yourself.