Red herrings are an inherent part of any mystery, and also one that is “gamified” - if you’ve played Clue/Cluedo there are potential weapons that are not used and their purpose is to verify they weren’t in the location/hands of the perpetrator and crime scene to narrow down the murderer/weapon/location.
Clue is the simplest form of a randomized game mystery and therefore lacks detail - a murder was committed in one of several rooms with one of several weapons by one of several people and a random card draw determines this. Details are not given, but sometimes emergent plot/story can pop up - the maid in the kitchen with the knife makes sense and you can imagine a scheming staff member offing her employer.
If you want a randomized mystery that changes and is replayable adding detail causes combinatorial explosion. If you watch the movie version of Clue they came up with three different ways the denouement changes based on set story beats - leaving several people out of important scenes when unseen plot points are happening. They considered a fourth ending but things got too complicated.
The trick is the base murder has to have enough open-ended threads so that any of the random possible suspects/methods can still apply until you reach a story point where it is customized for a particular outcome. This can be done easily mad-libs style like Clue “$murderer used $weapon in $location”.
I did some of this in Final Girl - basing it mostly on Clue - it was a slasher movie pastiche with several characters who could all be the murderer and could all be victims depending on RNG - the way to narrow it down was to find and identify bodies throughout a huge campsite. I found it easier to kind of hand wave the actual details of how the crime was done and load the story with horror movie tropes - masked killer, masked victims - victims triggered a movie flashback giving the player an advantage, each killer had a sort of stock reason they were the killer and because the actually mystery is vague it could all fit together in tinker-toy fashion, but the details had to kind of not focus on the mystery and be more of a boardgame type of thing - you had to progress the boardgame as busy-work for a clue to whittle down who the killer is not rather than working on who they were.
The more complicated you make the surrounding story, the more moving parts you have and unless well planned, it can be like writing entire different stories for every character. Which isn’t bad, but it can be difficult writing multiple entire plots for every outcome unless you have some gather points and crossover in the timeline/plot structure.
This can be simplified by having it sort of “modular” - once you get past a point the mystery is detailed and focused on the real killer. The risk of this is on replay it’s easy to give away - if it’s the “mechanic did it” ending the player realizes once they find blood on the wrench they’ve solved it without advancing through that entire module a second time once they recognize it. That requires potentially making more granular smaller modules that can still all fit together (maybe the weapon is a drill, but that could be the mechanic OR the gardener OR the carpenter potentially) but going too granular with randomized plot points that matter increases the amount of material the author must write and the amount that will ultimately go unused in a single play through.
I suppose procedural generation might help this, but it’s easy to fall into the “the ribbon was found in the chest, that means the debutante has been set up to be the killer”. What helps this is if the roll isn’t completely random, but perhaps details are fixed until the game is re-set and programmed not to choose the same outcome. Completionists will eventually realize there’s a potential ending for every character, so the mystery becomes less mysterious once they’ve been through six of eight suspects and know it’s one of the remaining two.
The other thing that may help is what Failbetter calls “fires in the desert” plot. Imagine a dark desert with several fires in the distance. The story only happens at the campfire points, but the player isn’t told what’s in between. With careful suggestive world building and intelligent omission of detail a larger story can be implied in the dark “between” the campfires using the player’s imagination to figure out connections that that needn’t be written. Each fire plot point just needs to be able to happen in any order and perhaps add a background element. This involves writing from a higher level viewpoint rather than the standard immersive point of view.
Vague example: Imagine two fires in the desert - a party of adventurers camping telling stories and offering food, and one party of adventurers stuck injured with their fire waiting for morning. If the character hits the healthy party first, they might talk of some of their friends missing and the player may find them later and point them in the direction of the good campsite for XP. If the player encounters the injured party first, they learn they are separated from their friends and when they find the healthy camp, they get XP for relaying information and location about them. The player had the same two encounters, but the story can work in any order. The sections walking in the dark between campfires might have had stuff happen - maybe there’s a dice roll that “injuries happened” - the player may improvise that someone fell in the dark or was stung by a scorpion (since those are logical world elements) but not need to be explicitly told. The fires are set plot points, the paths between are “Much later, during which this may or may not have happened” that can be left to player imagination.
I found the best way to figure this kind of stuff out is “how would I get this across in a physical boardgame?” Plot elements may be collected like cards and cumulatively add up to point to a particular ending that may not have been determined until the cards are drawn. IF engines with rules can do this well - essentially "if the player has seen the kitchen and the knife, it’s going to be either the Cook or the Maid or the Butler - and that can be determined later from a special “deck” that narrows it down, by drawing one of either “bloody cufflinks” “bloody apron” “bloody pepper shaker”