It has been a deeply frustrating and blood-soaked spring. Just about every week lately, it’s felt as though TV was hosting a Red Wedding for any character who wasn’t a heterosexual white guy.

Women of color, men of color, LGBTQ characters and white female characters have been killed off left and right. None of that’s new for TV, but the sheer volume of these deaths — a number of which were shocking for the wrong reasons — has been notable. When considered as a whole, it’s difficult for the suspicion that these characters are expendable not to harden into belief.

A lot of shows pride themselves on the idea that “anyone can die,” but is that actually true?

It doesn’t feel true when a large number of LGBTQ characters die in a matter of weeks.

It doesn’t feel true when a network TV drama, “Sleepy Hollow,” kills off its African-American female lead in order to provide motivation for the show’s white, male lead — whose lifespan, its worth noting, now stretches more than 200 years and counting. (There are reports that actress Nicole Beharie wanted to leave the show, which is understandable, given how poorly the show’s narrative and character development has been handled since early in season two.)

It doesn’t feel true when, in recent months and years, I can think of dozens of gay, female and non-white character deaths that were used to prod growth or vengeance in white, straight or male characters — but I can count on one hand the number of times I’ve seen that dynamic play out in reverse.

There have been moving deaths of late, notably a recent exit on “The Americans” that reflected the show’s themes of compromised morality and was depicted with spare, haunting compassion.

But what can matter more than the writing itself is the sneaking suspicion that certain characters on the TV landscape wear a Cloak of Invincibility. Does anyone think Rick Grimes is ever going to die on “The Walking Dead”? No, I didn’t think so.

Who does die? This year, dozens of lesbians and bisexual women have died on various shows, among them “The Vampire Diaries,” “The Walking Dead,” “Empire,” “The Expanse,” “The Magicians” and “The 100” (which also recently killed a character played by a black male series regular). In the last two weeks, notable women died on “Hap and Leonard,” “Vikings,” “Arrow” and “Sleepy Hollow.”

Say what you will about “Grey’s Anatomy,” “The Good Wife” and “Game of Thrones”: Prominent heterosexual white male characters have been on their RIP rosters (though not recently, of course). No one blinked when a black guy died on “Scandal,” because anyone really can die on that show — except a black woman. I can’t think of many other people of color in the drama realm who get to wear the Cloak of Invincibility, can you?

Before writers protest that viewers shouldn’t dictate what happens on TV shows, I must say that I agree. A good TV writer’s imagination is something to celebrate, not cage.

But the real problem is this: Who’s telling the stories? Just as certain kinds of characters appear to be protected, TV’s creative leadership tiers are dominated by certain kinds of people. Who wants to take a bet on whether these two issues are linked?

The recitation of stats feels rote by now, but let’s do it one more time: 74% of TV’s executive producers are men, according to San Diego State University’s Center for the Study of Women in Television and Film. In writers’ rooms, 87% of the scribes are white (and women and minorities are often concentrated in less senior positions). Director stats in TV are even worse. The number of LGBTQ showrunners might be less minuscule than it was in the past, but it’s still small.

Those of us who continually promote the inclusion of a wider, more diverse array of TV creators bang that drum for a lot of reasons. One of them is the avoidance of preventable events, like this spring’s Festival of Tired Tropes, which managed to invoke standbys like Bury Your Gays, Women in Refrigerators and the Black Guy Always Dies. Of course, there are gay and female showrunners among the storytellers killing off characters. But the vast majority of the most powerful people in TV come from the same subsets of the population, and are typically white, male and heterosexual, thus certain assumptions and forms of obliviousness are going to keep popping up.

The end result is a situation in the TV drama realm in which certain characters have targets on their backs while others often appear to be bulletproof. Of course, no one wanted this situation, but given the networks’ and studios’ hiring practices at all levels, especially on the showrunner tier, it was all but inevitable.

Contributing causes of the bloodbath aren’t hard to discern. TV writers under pressure to deliver excitement often resort to the same array of go-to plot twists, and quite often the way to goose the ratings or get buzz is to kill off a character. The leads are usually too important to take out, so storytellers choose from the ranks of supporting characters. And that’s where people of color, women and LGBTQ characters most often can be found.

So the first solution is: Have way more LGBTQ, female and non-white characters that are integral to the core narrative (and presto, your show will also look like America, which is 40% non-white). Allow some of those core characters to get fitted for Rick Grimes’ Cloak of Invincibility. Put characters through hell, sure, but do it without falling into the traps of predictable cliches. Remember that death doesn’t always need to be the answer; there are a lot of ways to write off characters that can be resonant and consequential for the characters that are left, and some fates are worse — and more interesting — than death.

If you do kill off characters from underrepresented groups, think about why that particular character has to die. Ponder whether that death will be one of an array of deaths that includes straight white dudes. Quiz yourself on whether that death seems sloppy and rushed, or thematically rich and of a piece with the show’s core concerns. If an actor needs to leave or a character has run out of story — and that does happen — make sure that individual gets an amazing sendoff, one that inspires paeans and praise, not tears of rage. Fans don’t want nothing but happy endings, they want emotionally fulfilling, cathartic exits. It can be done.

Nobody should listen only to fans: Perish the thought. But taking their pulse to see what matters to them about your show is only smart, especially in a brave new nonlinear world in which word of mouth and fan-based marketing and promotion are more important than ever. And there might be instances in which leaving the door open to a character’s return — even for a short visit — might be preferable to yet another trope-adjacent death.

Some shows have pulled off all the moves mentioned here, including high-profile deaths, and gotten kudos for doing so. Those shows didn’t have magic cloaks protecting them from fan reactions, they just had writers who really thought about the impact of those choices from a host of angles.

No self-respecting writer wants to be guilty of employing junky elements like the adorable sitcom kid who spews corny jokes or the police lieutenant who tells his rogue detective that he’s too damn close to the case. Shopworn (and damaging) cliches about gay characters, female characters and people of color should be avoided just as assiduously. Smart story moves, at the end of the day, can feel shocking but also inevitable in all the right ways. They can feel like tired reruns, or they can feel inspired.

Some TV creators are trying to include more kinds of characters in their narratives, and that’s to be applauded and encouraged. But the point is, “diversity” is just a buzzword unless an array of voices are truly included and heard — and put on the screen. And that starts with networks and studios hiring more creators and head writers who are not white, not straight and not male.

“Anyone can die” won’t be a truthful sentence until “any kind of character can be at the very heart of the story” and “anyone can run a TV show” are factual statements as well.