United States writer whose best-known novel was based on his experiences as an attendant in a mental hospital (1935-2001)