The Cell had to have been a huge inspiration. The idea of inducing sleep to venture into the mind of a killer and being able to witness glimpses of his past in order to stop his plan from becoming a success is very much represented in SH4. The torture scenes and the aspects of possession and reanimation are even represented. A Nightmare on Elm Street (a serial killer haunting you in your sleep; if you die in sleep, you die irl; he can be survived; things in the otherworld/dreamworld manifesting in reality; etc.) is another film that most likely played a large role.