I like the "killer hidden inside the team" kind of plot and the shock with it.

I really don't mind spoilers.

Tell me what you saw is an example but preferably more involved than that villain.

Vincenzo 

And kind of...He Is Psychometric (the killer is the ML's brother, a prosecuting attorney, who is working on the casr)

  • Ryusei no kizuna
  • The midnight studio
  • May I help you
  • Tunnel (not a cop nor detective but the killer is the medical forense)
  • My family
  • Mouse
  • Café Minamdang The prosecutor and nice guy friend  friend of FL that helped her invesigate turned ou to be a psycho
  • He Is Psychometric
  • Mouse
  • My Lovely Liar- this is mostly romance but the ML was accused of murder but the culprit was actually his best friend the whole time.
  • Taxi Driver Season 2 The new guy on the team turned out to be the bad guy behind everything 

The Usual Suspects probably most famous example of such!

Not entirely sure if this counts but in My Lovely Liar the detective (Kwak Jin Hyuk) is hiding some crucial information that could otherwise help solve the case

There was Elementary, where sherlock Holmes former girlfriends ended up being professor Moriarity!