Don’t be so cruel as to enclose him or her in a small space. Leave that to the barbarians.
Plan A: You take him to a vast empty space, let him run completely free for several weeks, then follow and begin imitating whatever he does. In this way you gradually get his attention. Up to now he hadn’t a clue that anyone else existed, there was only a hostile chaos out to smash him if he didn’t smash it first.
You should know you’re dealing with a badly injured being in full amnesia. You treat him with calm kindness. Steady as she goes. No court-like hysteria, no foolish judging or religious mania. Soon, begin to have him imitate you. All this will be a revelation to him. The process is expensive.
Room and board alone costs a bundle, so your other option is to shoot him; a psycho must be taken out of human society. If you kill him he will of course come back but often they come back sane. If not, go back to Plan A. But on no account return him to your court system— their punishment will insure that he murders again and again for eons, unchanged.