The scraping and running all about sounds a bit like he may have been spooked by something. If a hamster suddenly acts frantic, it's generally a sign there's a sound or smell he doesn't particularly feel safe around, but it can be hard for us as humans to know what it may be. A dog barking down the street or even the smell of smoke from cooking can set them off, when it wouldn't bother us much at all. Just keep an eye on him, and if he does it again, try to note any noises or changes in the environment that could be upsetting him.
I'd personally be more concerned over his food and water issues. It's plausible he's scared by something and that's why he doesn't want to come out and eat, but not eating can be an early warning sign that something is wrong. Does he seem lethargic? Does he seem sickly or does he just have an overall malaise? I'd recommend doing a thorough health check and if he seems off at all, it would probably be a good idea to book a vet appointment. Hope everything is okay