Close hospital units where vulnerable people are 'contained'