Plot hole: Sonny hides among the 1000 robots in the big store room. They are all placed in very straight rows. Sonny would not be able to take over another robot's place in the grid (when he starts running we see a large robot-sized gap) without getting another robot to move. And while Will Smith is running around the rows, he would have noticed if the others moved to make room.
Suggested correction: Sonny was already at the factory before Spooner and Calvin showed up. It's possible he moved in a robot's space, and either the robots to his sides or the ones behind him moved back a space (we never see the rows in their entirety), hence no need for any of them to move while Spooner and Calvin are in the storage room.
Suggested correction: Will Smith shot one of them, it's possible this hole in the front of the row caused that line of robots to move forward one spot, to complete the row again. As they did Sonny could have slipped in. When he spotted Sonny the first time Sonny was simply standing between 2, as Will Smith only saw them from the front at that point, when he started running it's impossible to notice a simple step forward of 1 row of robots and Sonny slipping in.