Scott Michael Greene in Iowa made the tragic and horrifying decision to brutally and cowardly kill two police officers. He had a criminal record and a history of run-ins with the police. He should have been caught sooner. The fact that he is a white male likely shielded him from the full wrath of the criminal justice system.
You cannot just arrest a person on the premise that they are a problem. The police had nothing to arrest him for up until he killed those two officers. The real problem seems to be the mental health system. The man very clearly had mental health issues, and should have been taken care of in that sense. Unfortunately, there just isn't the access available to the people who need it most.
I do agree that Scott Michael Greene committed a horrible act, but you cant detain someone just for having run-ins with police. If that were the criteria than a lot of innocent people would be detained every day. You have to wait until someone commits a crime before you can "catch" them.
While Scott Michael Greene had a history of contact with law enforcement agencies in his community, none of his conduct met the standard for arrest, trial and conviction. The police departments cannot, and should not, be able to lock people up simply for expressing free speech or unpopular acts that are legal.