My GS4 only gets hot during games, benchmarking and when using the Camera heavily, it's to be expected, all those things demand a hell of a lot of resources from both CPU and GPU.
Every Android I've owned (Xperia X10i, Galaxy S2, Galaxy S3 and Galaxy S4 Octa) gets hot under heavy load, these devices are tightly built so as to be thin as possible, while running seriously powerful hardware at high frequencies, so I expect them to get hot now and then, but long as they don't get so hot you cant touch them.
I once tried to launch the Camera of my GS3 after it had sat in my cars center console on a very hot day, the sun had even shone on it through the sunroof, the GS3 threw a message at me saying the Camera cannot launch as the phone is running at a high temp. it also does this with the flash and turns it off if the phone runs ends up running at too high a temp. so atleast I know the phone won't let things go out of hand.
Samsung GALAXY S4 32GB Exynos Octa Black Mist
Samsung GALAXY S2 16GB Exynos Dual Ceramic White
Apple iPad 4 16GB White WiFi+LTE
"World can't hold me, too much ambition"-Jigga