Certain elements lend themselves to certain genres or subgenres, a type of character, perhaps, or an object, locale, even the sort of inciting crisis in the story. But, having a detective in a novel, even as the main character, does not mean you're going to read a detective story or a fair play mystery. War, in a story, does not make it a war story. Most of the time, however, it does imply it. It's hard for me to think of a story that stars a detective but is not a detective story, to revisit the idea of two sentences ago. Post-Asimov, most robot stories are robot stories; a scary number of them even have Three Laws or feel the need to address the Three Laws upfront. If they're not Asimovian, they're Frankenstein ("Why did you make me!?!") riffs.
Vladimir Nabokov's King, Queen, Knave has robots in it, but it is decidedly not in the Asimovian mode, and doesn't attempt to address that strain of fiction, that structure, at all. It's not simulacra throwing off the yoke of their commands and design. It is very good, very thrilling and intriguing and sometimes pitiably embarrassing to draw up your empathy.
Joe Lansdale's The Drive-In isn't set in Texas to make some grand point about Texas. It's set in Texas because that's where it's set. Which, really, you can't say for most fiction set in Texas, even by Lansdale.
Ed Lacey's Enter Without Desire is a murder mystery with a detective, a gun, and a beautiful woman, but it's not structured along any common genre pattern, particularly because the identity of the murderer is implicit from early on, as the novel leaps back and forth between times.
The Watcher in the Woods manages, as a film, to entirely escape expectations of an alien visitation movie, because it lifts all its genre structure and cues from a different setup entirely (haunted house mystery), but I haven't read the novel, so I don't know if that's true there, as well.
Any recommendations along these lines?