Static shocks all over the building
Can static shocks occur from grounded and ungrounded metals?

Yes. A large ungrounded object still has capacitance. If there is a higher density of electrons on you than on the object, the electrons on you will feel repulsion from the other electrons on you and want to jump to the object where they will have more room to spread out. (Same goes in reverse if there are more electrons on the object.)

Eventually if people keep transferring electrons to the large object, then the electrons will build up on the object until they push back as much as the electrons on you, and there will be no spark. The bigger the object, the more electrons it takes to "fill" it up to having the same density of electrons as there are on you. Grounding an object connects it to the earth, which is the biggest object around and so represents a practically infinite sized holder of electrons. You can keep charging yourself up and then discharging to the earth and never make a practical dent in its charge density. 

How do you prevent getting zapped when everything around you is metal and glass floors?

You can either...


Prevent yourself from accumulating a different density of charge relative to the metal building.

a. Wear a pair of diamond soled shoes. Because this material much closer to glass on the Triboelectric Series, you will accumulate less charge while walking compared to the rubber soled shoes you are likely using now. Alternately, you can cover the soles of your existing shoes with a rich red acrylic coat. 



b. Keep yourself electrically connected to the metal at all times, possibly using a wrist strap that is tied into an overhead Pantograph system on the ceiling.



c. Increase the humidity in the air inside the building, possibly by installing a large fountain or waterfall in the center of the atrium area. The humidity will help excess charge bleed off your body and therefore prevent you from accumulating enough to cause a spark between you and the metal. 


Prevent any charge you have already accumulated from making a spark and "zapping" you.

a. Buy a conductive arc flash protective suit and wear it whenever you are in the building. The zap between your body and the metal is just a smaller version of the arcs that linemen and electricians deal with everyday, and this suit will keep the arc between the metal and the suit rather than your skin, so you should not feel it. Be sure to get the suit inspected and certified frequently.



b. Get a hot stick. Anytime you approach a metal shelving unit, use the hot stick to equalize the charge between your body and the metal before touching it. There is still charge flowing between your body and the metal, but the high resistance slows that flow by reducing the current to levels that should not hurt. 



c. Evacuate the air inside the building. With no air, there would be no gas to ionize and therefore no arc to zap you. This would require hermetically sealing the building envelope and using a large pump to remove the air and maintain the vacuum. This might also require structural modifications as the forces generated by the external air pressure on the building surfaces can be quite large. 


What is the worst case scenario if I unbound the metal structure from mains earth? (Not contacts, nor lighting rods, just make sure to leave the metal book shelves ungrounded), will the user still get shocked?

People would still get shocked until the metal was charged up. Once the metal was charged, it would still zap people who had not yet been charged themselves by walking on the floor yet. It would probably make sense to divide the building into a dozen or more zones of increasing charge, each completely electrically isolated from the others. The zone near the entrance would have the least amount of charge to accommodate people first entering the building who have not accumulated any charge yet from walking on the glass floors. The zone farthest from the entrance would be at full charge and would hold the physics textbooks.