united-states
The patient is personally liable unless the underlying law has a requirement of specific intent. There is a tort law rule stated in the Restatement (Second) of Torts that
Unless the actor is a child, his insanity or other mental deficiency
does not relieve the actor from liability for conduct which does not
conform to the standard of a reasonable man under like circumstances
Mental illness does not immunize against criminal prosecutions, but could in specific cases preclude conviction for a criminal offense, depending on the intent requirements of the crime (for example did the person intend to cause the harm, or did they just have an unreasonable belief that they would not cause harm).
The patient's insurance company would probably gain secondary liability.
The care facility could gain liability, if they were negligent in preventing the patient's escape (and even less conditionally, if they intentionally let the patient break in). You could expand this part substantially to determine where facility liability exists.
The (local) government is generally not liable, given the doctrine of sovereign immunity. However, the jurisdiction may have statutorily allowed suits for wrongful acts. Complaints about a planned land use are ubiquitous and do not create government liability, but said complaints might have included objective facts that would be unreasonable to ignore. There is little practical possibility that the government could be found liable for permitting a mental care facility, though there seem to be no test cases where the Arkham Free-Range Halfway House for the Criminally Insane was situated next to an elementary school.
We can also include the courts as imaginable defendants: you might think that the courts could be held liable for not assuring that the patient is incarcerated in a super-max facility. You can't sue the courts for following the law. Nor can you sue the legislature for not enacting a law that somehow prevents the harm.