Alike and Antithetical Adversaries

Humans are naturally social beings, and we can tell a lot about a person by knowing what groups they're a part of. What's more, we can tell a lot about a conflict depending on who makes up the given groups. Authors can take advantage of this to design the overtones of a conflict by engineering the groups at war into being homogenous (all alike) and/or heterogeneous (all different). This can have up to four combinations, as detailed below.

This comes in four flavors:
 * Heterogeneous Heroes vs. Homogenous Villains: The "classic" set up. This is used when an author wants to portray good as multicultural or what not and the bad guys as all alike and all equally evil. The good guys will often work by Teeth-Clenched Teamwork and be a very diverse Ragtag Bunch of Misfits, both superficially (race, using Custom Uniforms), socially, culturally, religiously, or temperamentally. To contrast, the baddies will usually be monochromatic in very obvious ways. At the very least they will all dress alike, and complement that overt gesture by being ideological or religious extremists, all the same ethnicity, being solely men or women, or even species. One extreme representation of this is to use a horde of identical robots, insects or clones. The symbolism here is that heroes can come from any walk of life, but villains are all the same. This can be especially useful when using non-human enemies or imaginary ideologies, as it can avoid designating any real world equivalents as bad.
 * Homogenous Heroes vs. Heterogeneous Villains: Flipping the above has an interesting effect. Having the heroes share the same background (be it family, home town, or ideology) or world view can make it easier to bring them together. The similarities don't necessarily have to be religious, ethnic or even in wardrobe, however they share enough similarities of one kind or another that viewers who know the characters can infer that good people share these same unifying trait(s) and values. Conversely, a bunch of diverse minions lead by the Cosmopolitan Council show that evil can take any shape, and warns that The Dark Side isn't exclusive in its membership (and avoid irate censors). One interpretation of this is that evil is divisive, while good is unifying. Heroes can work together, villains backstab each other into failure.
 * Heterogenous Heroes vs. Heterogenous Villains: Portraying both as heterogeneous groups has the effect of making a conflict seem very worldly, or possibly even gray. By removing easily identifiable unifying traits it makes it difficult to tell apart heroes and villains, at least in terms of characterization, and allows the author to dive right into questions of just what separates good and evil, heroes and villains. In these cases the conflict may be characterized as The Federation against the Anti-Human Alliance.
 * Homogenous Heroes vs. Homogenous Villains: On the other hand, monochromatic bands of heroes and villains are very... well, archetypal. Here the differences between characters are drawn not from obvious background or appearance, but in motivation and character. A story where both bands are of "identical" groups can focus more on what brings entire groups into Always Lawful Good and Exclusively Evil territory, while spending time focusing on individual motivation.

It's worth mentioning that a story can begin with either side (or both) as homogenous and transition into a completely heterogeneous cast with the help of characterization, an Enemy Civil War, and of course the Defector From Decadence who protests their brother's ways. If this is Speculative Fiction, then sometimes In the Future, Humans Will Be One Race will come up.

Anime & Manga

 * Berserk would be Heterogeneous Heroes (sort of, as there is a total of three black people; one character [Casca], one bystander, and the last one [Donovan] was an evil bastard on the same side as Guts) vs Homogenous Villains: The original Five-Man Band had a Scary Black Man (Pippin), and the one black character in the Band of the Hawk other than Casca. The human enemies tend to be all white (or later on, all brown). When you throw in the demons, which are all unique because of the different lives they led as humans and the different circumstances that led them to call on the Godhand to become demons, we get a case of Heterogenous Villains as well.

Film

 * Star Wars: Return of the Jedi has the multi-species Rebels and the implied in costume fascist Empire. EU material confirms the Empire to be speciesist, employing (mostly) only white male humans.
 * In A New Hope all rebels are human as well, making it Hom-H vs. Hom-V. And in The Empire Strikes Back, the use of the bounty hunters makes it more Hom-H vs Het-V. It is explained in the EU material that in the beginning the military branch of The Alliance was indeed mostly human, because the Empire's treatment of non-humans made them distrustful of all humans and because humans are the only ones allowed into military training and only human worlds are allowed to have a militia.
 * Monsters vs. Aliens has a group of extremely unique protagonists, led by a Reasonable Authority Figure. The villain is a standard Omnicidal Maniac who wants to Take Over the World, and his plan mostly involves cloning himself to create an army.
 * "The Matrix" takes this trope to the next level: it has a diverse group of characters as the rebellion, spanning multiple races, ages, and genders, but the villains -the agents- are as homogeneous as you can get: they have the same appearance, voice, costume, etc.

Live Action Television

 * In Star Trek: The Next Generation, the Federation was a peaceful amalgam of various species, while the Borg were a Hive Mind of complete conformity.
 * The original Star Trek the Original Series also had this with the Enterprise bridge crew being ethnically diverse including a black woman, which would have been impossible at the time, and an half alien where as the main enemies were the Klingons and Romulans who were portrayed as fairly homogeneous.

Western Animation

 * By the end of Avatar: The Last Airbender, members of all four nations are working to defeat The Fire Nation, including characters from all over the already-highly-heterogenous Earth Kingdom.
 * Subtly done in Saints Row 2 (though you would hardly call the protagonists heroes). Gang members are very skewed racially to their ethnic group and local whites (or just whites in the case of the one local born gang) but right from the start, the generals in the Saints are a diverse group and the generator for random Saints can generate all races.

Live Action Television

 * Various breeds of Power Rangers, most notably the first group, consisted of a group of teenage martial artists from Angel Grove fighting a seemingly random mishmash of human- and non-human-shaped monsters. Interesting, some of the human-shaped monsters came from a family that was predominantly monster-shaped, and vice-versa, further underscoring the heterogeneous mix that was evil.

Western Animation

 * The Planeteers are a good example of an on the surface diverse cast that is nonetheless homogenous. They all come from different continents and backgrounds, but share a common passion to save the planet. Meanwhile, their Rogues Gallery is amazingly diverse, being motivated by greed, pride, gluttony or sheer spite. While the good guys are all united in saving the planet for the same reason (which is that you should), the villains all have very different motivations.
 * The early episodes of the Thundercats: the titular heroes (with the exception of Non-Human Sidekick Snarf) were all Thunderian Catfolk, while the mutants were several varieties of Petting Zoo People. As the setting developed, it became more Het-v.-Het, as the Thundercats allied themselves with other residents of Third Earth, including the Amazon women and robot teddy-bears.
 * This pattern holds in Continuity Reboot ThunderCats (2011), with The Hero Lion-O coming to understand that to defeat "Alone with Prisoner" Ploy Overlord]] Mumm-Ra's multi-species armies, he must gather Petting Zoo People allies as well.
 * My Little Pony: Friendship Is Magic is another good example of an on the surface diverse cast that is nonetheless homogenous, at least in the first five seasons. All of the Mane Six come from different backgrounds and have different (but sometimes overlapping) interests, but they all share common ideals of co-operation and friendliness (toward ponies). Only a few Token Heroic Orc types appeared in the first five seasons, like Spike, Discord (post-Heel Face Turn) and Gustave Le Grand. They also look very similar apart from being different colours and having wings and/or horns. Their Rogues Gallery is far more varied, including a God Empress Winged Unicorn with the power of Darkness, a Jerkass Griffon, a group of dogmen kidnappers, a group of Buffalo that are a Fantasy Counterpart Culture to the Native American tribes of the Great Plains, a Mad God Mix-and-Match Critter, a group of Teen Delinquent Dragons, a pair of Con Artist Unicorn Brothers, a race of shapeshifting insectoid Emotion Eaters led by a Hive Queen, a Stoic Unicorn King with the power of Darkness, a demonic centaur and a powerful female unicorn obsessed with removing individual identity and powers because she believes Utopia Justifies The Means due to a Freudian excuse.
 * Seasons 5 onwards starts to trend toward Het-H versus Het-V. Several previously villainous characters and races are given Heel Face Turns and races previously portrayed as Always Chaotic Evil are now shown to be Not Always Evil, giving the ponies more non-Pony allies and friends. The villains still remain diverse and mixed to the very end, and the final villainous trio consists of a demonic centaur, a Hive Queen (albeit no longer the leader of a race of insectoids) and a Enfant Terrible Pegasus.

Comic Books

 * The X-Men vs. bigot group of the week. Seriously. The X-Men, being mutants, come from diverse walks of life, and the humans who "hate and fear them" and routinely mess up their front yard are also (usually) very diverse. The message being that bigotry and intolerance can come in any shape and size.

Film - Live-Action

 * The prequel trilogy in Star Wars uses this in the leader heroes and antagonists to demonstrate just how morally gray the war is. The Separatists aren't all bad, nor are the heroes fighting for the right reasons. They're all Darth Sidious' pawns.

Literature

 * In Animorphs, both sides of the conflict are very heterogeneous, both in species and personalities. Yeerks, by their very nature, must essentially become different species (in addition to more traditionally recruiting other species, like the Taxxons, for their uses). Humans, Hork-Bajir, and Andalites all oppose the Yeerk forces. Both factions have individuals who switch sides or change beliefs or alliances, and a major theme of the series as a whole is that no one species is all good or all bad.

Live Action Television

 * Star Trek: Deep Space Nine featured The Federation, the Klingon Empire, and, against The Dominion, the Caradassians, and  . This, along with many other elements, went along with this show being Darker and Grittier than The Next Generation had been.

Video Games

 * The Alliance and the Horde in World of Warcraft each consist of five or six different races united towards common goals. Graying things up further is that, despite their own animosity, the Horde and Alliance have (reluctantly) worked together in the face of common enemies.
 * A much less gray example from the same game is Twilight's Hammer (villainous) vs. The Earthen Ring (heroic).

Film - Animated

 * Fire and Ice has the heroes all represented as caucasian, while the bad guys are Beast Men who are led by The Man Behind the Monsters.

Film - Live-Action

 * In the Star Wars prequel trilogy, the infantry troops are all nearly identical, whether genetically or by being the same model of robot.

Literature

 * Harry Potter has courageous heroes motivated by The Power Of Love and cruel villains motivated by self-interest, prejudice and insanity (in varying quantities).
 * Though in terms of alliances The Lord of the Rings has both sides of the conflict employ diverse peoples and even species, on the ground Sauron was the only one to employ mixed forces with Goblins, Orcs, Uruk Hai, Trolls and Easterlings. The hero factions only unite on the field on a handful of occasions. Interestingly, the diversity of The Fellowship is often remarked upon.