For example, if a guard enters a room and watches someone but does not speak, is this character introduced in all caps as GUARD? What if the character's role is even more limited: a little girl hands flowers to someone? Also, how does this apply to large groups, such as spectators, protesters, or crowds? If the character(s) requires casting, should all caps be used?
Yes - if the character is going to be featured (ie obviously doing something) then the director and casting director are going to need to know who they are, so they should be called out in caps.
If they're merely background colour, then they stay lower case.
INT. MUSEUM. DAY. Smith enters the museum, pushing her way through the crowd of parents and children. A GUARD spots her, and draws his gun, firing into the crowd.
If we wanted to call out someone who gets shot, or is otherwise important to the action in the crowd, then they would be capped. So the little girl handing out flowers in your example would be too.
Some writers like to say upfront that a character won't be speaking later. This is usually done via N/S (for non-speaking) or ND (no dialogue). Pick whichever you prefer and use it consistently.
INT. OPERATING THEATRE - DAY DOCTOR BOB is elbow deep in a patient. An N/S NURSE wipes the sweat from his brow.