Edit : These are my alternative theories about how the events in the show could have played out better.
I think the fact that Wilden had a relationship with Alison and then later tried to investigate her murder makes absolutely no sense and creates a huge plot hole. If you think about it, of the three predatory relationships involving Alison that we know about, Wilden's is the only one she never talks about. On top of that, there are also theories that CeCe lied about a lot of things during her reveal and framed several people, so why not Wilden too? After all, when he was still alive, he seemed to be the only person who could actually stand up to CeCe.
His character works perfectly well as a corrupt police officer who tries to investigate Alison by any means necessary, even illegal ones, perhaps also to help Jessica. We also have to remember that Ezra and CeCe knew each other because they attended the same college parties, and during Season 4 they were even working together. So who's to say she didn't actually cover for Ezra because he was the one who had almost gotten Alison pregnant? Obviously, when Alison reunites with the Liars, she says Ezra never did anything to her, but he's also a manipulative predator who could easily have blackmailed Alison in some way to keep the secret. Throughout Season 4, Alison seems afraid of someone, and during her reveal in 4x13, she tells the Liars to be quiet just before Ezra arrives. Everyone lies in Rosewood, including Alison.
On top of that, there's the whole storyline about the plan to eliminate the NAT Club, which always ties back to that night, CeCe and Melissa. So it's very likely that the two of them were trying to cover their tracks. Wilden would therefore have been investigating the NAT Club, while Jenna and Garrett would have tried to frame the Liars for the murder. And if we also consider the possibility that Spencer may or may not have been Bethany's killer that night, it makes sense that Wilden would suspect the Liars. Garrett was later arrested for Alison's murder, but he knew Melissa was involved that night and that Wilden had repeatedly broken the law. So the two of them would have been forced to try to get him out of prison in order to kill him. A needed Garrett to be released so they could silence him.
This would also better explain the events on the Halloween train: CeCe could have taken advantage of the situation to cause chaos by drugging Aria and locking her in the box without anyone knowing, and I also think Ezra was involved somehow. Isn't it strange how Ezra suddenly showed up on the train after Aria had been freed? Or all his suspicious phone calls? Or even the fact that the money he was hiding in his drawer was the exact same amount Jason had offered to get his sister's body back? Marlene tried every possible way to clean up his character, but he always seemed more involved than he let on to me.
If we look at things from this perspective, everything changes regarding the events at the end of Season 3, with the fire at Thornhill Lodge, but also the B-Team, which Melissa might have created to plot against CeCe, considering the Melissa-Jenna-Shana-Wilden connection. I also believe Shana was created to continue Noel's role in the show and was then killed off when the actor returned. We can get rid of Sarah Harvey too, since she was clearly a last-minute decision.
The fire at the lodge wasn't meant to kill the Liars, but rather to use them as bait to lure Alison out of hiding. After all, they were rescued by someone else before she arrived. Even the coincidence of the fire being started right after Spencer walks away could have been part of Melissa's plan. After his death, Wilden was made the scapegoat for everything, and everyone blamed him while the other members of the B-Team, such as Jenna, were targeted. He and Melissa could have been longtime friends, temporary allies, or even enemies. We also have to consider that CeCe and Wren were working together, and it's very likely that he got the sleeping pills and the bullets from Mona at Radley for the Queen of Hearts costumes, considering how close she was to him.
At this point, there are two possible scenarios: either Melissa killed Wilden because she was afraid he would discover the truth about Bethany and then tried to frame CeCe, or CeCe was the Red Coat getting off the plane to distract Spencer while Wren killed Wilden near the bell tower. Either way, he would have been portrayed as a disgusting, corrupt man because everyone involved would have blamed him for everything. Besides explaining the presence of the Black Widow (Melissa) at Wilden's funeral, this would also resolve some timeline issues, such as her presence at the lodge, which I don't believe in, and the fact that his body somehow gets moved from one place to another.
I know, guys, that I keep insisting on this, but it has always made sense to me that Wren was Charles because he had the closest connections to Radley, Mona, medical knowledge, and all the clues. Otherwise, why would he help CeCe torture the Liars? It would also make much more sense for him and CeCe to blame the Liars for Bethany's murder, especially since they had to steal her remains from the cemetery to verify this theory. Wren would then have become obsessed with Spencer because he believed she had killed the person he was closest to, and he would also have blackmailed Melissa for helping cover everything up.
So many things start to make sense if we consider the A Trinity (CeCe/Red Coat, Wren/Charles, Melissa/Black Widow). It would also explain the connection between Big A and the NAT Club and that night, the conversation between CeCe and Melissa, the murders, the attempted murders, the possibility that Ian was actually killed, A's extensive medical knowledge, the connection between the Hastings and DiLaurentis families, Spencer and Alison's close connection to Big A, the possible Wren-Bethany-CeCe rriangle, and the plot holes surrounding Wilden... Everything seems to fit together somehow from this perspective.
Obviously, these are just my alternative theories about things that were poorly explained and abandoned in the show because, of course, Marlene, being stupid, was never able to put the pieces together in the simplest possible way. Instead, she just kept dragging things out, trying to outsmart the audience and focusing only on her stupid ships without giving the story any real coherence. Going back to the title of the post, I'm starting to question what we were told about Wilden, and I think CeCe might even have lied about her true identity.