When I'm running a D&D type game I'll create series of encounters, whether they're in dungeons or some other place, and give the encounters level appropriate treasure. The structure is a lot like a classic D&D module, complete with random encounters, events, and treasure. Then I decide how I want to run it, and that's were it changes according to the theme.
I got into the habit of writing adventure outlines about two decades ago and refined the technique. It's a synopsis of the adventure. However, I take my generic adventure and use this outline to modify it according to the story I'm trying to tell. All DMs do with the commercial modules they by. I took it a step further and modify my own work. I've found that it helps me stay flexible enough to present the strongest narrative. It really helped me on Friday when I had two people cancel at the last moment. All I had to do was spend about 15 minutes modifying the outline for fewer PCs, and highlight the details that best served their current skill sets (they lost their Rogue and Fighter).
The game is an Eberron Detective campaign that plays more like 70's TV police action show than a D&D game. The last session involved talking to witnesses, following leads, a foot chase, and knocking out the bad guys. It started with the PCs following the leads they had from a witness and connecting the clues they found at a scene. The witness took the PCs to the place she was kidnapped, and one of the PCs who is a gnome wearing a masquerade mask, ended up getting kidnapped when they were separated. The chase scene was exciting, and funny with the classic trope two workers carrying a pane of glass and one of the PCs accidentally runs through it. The PCs cornered the kidnappers and interrogated them. They were able to get some information for the delivery, which eventually led them to a final destination. Then they sneak into a mansion during a masquerade ball using a service entrance where they were discovered and attacked by Cultists. That's where the session ended.
The TV cop drama has four basic components that are useful for TTRPGs:
1. Mystery - unsolved crimes and clues
2. Unreliable Witnesses - the witness isn't telling the whole story
3. Street Danger - simply investigating the crimes is dangerous
4. Big Reveals - there's always something the PCs missed that gets revealed
The pace is a little different from other games as there's often a sense of urgency. In the current adventure there are children being kidnapped. There's a 48 hour window before the children are gone for good. Normally D&D, or any RPG, doesn't put a time constraint on the adventure. The cop drama is fast paced. The PCs need to gather evidence, and if they can't identify it they'll take it to an expert, and comeback later as they investigate the other clues. They're in a constant state of motion. Short rests are rarely a problem but long rests are hard to come by.
The way encounters are structured is also different. The encounters exist on a flow chart rather than a dungeon, and serve the narrative. Each new scene is a mini-dungeon with its own set of challenges. Unlike most dungeons, there are no doors or hallways to direct the PCs. Instead, you must leave breadcrumbs and rely on witnesses or fellow law enforcement to serve as guides and lead them to the next encounter. One example was a warehouse full of dangerous, illegal symbiotes (the classic criminal warehouse shoot-em-up). The PCs were led to that location by the colleague for a deceased witness. Another example is the PCs stumbling on to a crime scene - the witness was murdered (sometimes the killer is still at the scene or just running out the back door). Now the PCs must look for clues to see why, and dig up information that leads them to the next encounter.