A man has been arrested in China after allegedly smashing elevators and toilets with a hammer at stations along Shanghai's subway line one.