Ok so I'll expand: morality is all about intent, people lie (to others and themselves) about intent, and the ends don't justify the means.
The examples of a mentally ill person going on a rampage: that's tragic, but it's not immoral. It's no more immoral than a person with rabies going on a rampage - there is no agency there.
Things like physical harm to "build character" - that's lying to oneself about intent. The intent there is to harm and use "build character" as a justification. Same for any other "I'm doing this for your own good!" kind of reasoning - if the focus was on "your own good" you'd find another way to do it, not the way that lets you indulge in violence or self-aggrandizement.
It's also why having malicious thoughts but not acting on them is
still immoral, and why "thoughts and prayers" without action is
also immoral.
The ultimate conclusion is not a new one: every single person is immoral to some extent.
I mean mostly stuff like "If you look at your friend's wife and feel the desire to have sex with her you are an immoral sinner and should pray to God for forgiveness"
This example is... incomplete at best. Stopping at merely forgiveness is where it falls short - the better prayer is to ask also to change your desires, so that you no longer want something you don't have. Pining after someone not your spouse is, if nothing else, not good for yourself even from a selfish standpoint.
The tragedy of such people is that they can't pursue what they want without harming other people and their only moral option is constant self-restraint. Those are victims, not evil.
This presupposes the highest aim is self fulfillment, and not everyone shares that belief. Also children aren't victims when you try to teach them restraint from wasteful activities "that're what they want" - so why would it be universal that simply because an "adult" wants something, asking them to exercise restraint makes them a victim? It also presupposes a narrow definition of "harm" limited generally to discomfort rather than a more broad meaning like perpetuating misunderstandings of the universe - take flat earth belief for an example of "harm that doesn't cause physical or emotional pain."