I absolutely agree that the writer has to know what's going on in the characters' minds (unless it's an exploratory first draft). But in the tv shows I've seen (I'm a big British mystery fan--the prime example I know of is Line of Duty), the AUDIENCE is often in the dark about the inner world of a character. Half the time, the viewer isn't sure if one of the protagonists is the villain or not. But when you think back over the stories, it's quite clear that the writer(s) were aware at all times (at least in the finished version) of the motives and goals of all their characters.
You can't keep the viewers in suspense if they know where everything's going. But you can't keep the viewers in suspense if you (the writer) don't know where everything's going.