There is no way to keep people from harming others. We know this is true because even in prison, where freedoms are curtailed far beyond what any normal person would find reasonable, people still find ways to hurt, even kill, each other.Anyone bent on murder will find a means, how would a free society keep a violent person from harming others?
The bottom line is that some people will misuse what freedoms they have to do things that society finds unacceptable. A society that attempts to prevent violence by eliminating freedoms will eventually find that even when everyone is effectively a prisoner, violence still continues.