it was the army, nobody was just taking what they wanted.
That's why I said "issued". Other posters have already noted that additional ammunition was sometimes issued, and men would take ammunition from casualties as well. It all depended on circumstances.
A vital part of the management of a regiment during a firefight was the passage of arms.
That's "passage of lines", not arms. You've got the right idea, but I think you'll find it was typically carried out a brigade or division level - not within a regiment.