How should ground wires be handled when updating switch loops in an older home?
No fake grounds: Don't create "islands of grounding"

Grounding must start at earth, via your grounding electrode system, to the main panel and its equipotential bond.  Then it must be carried onward from the panel sequentially up the branch circuits.  

If you don't do that, you create an "island of grounding" where a few nodes are grounded to each other but nothing is able to return fault current on the ground wire. In that case, you have simply created a "Ground Fault Distribution Network".  (Bad thing). 

It means that if any device on that island has a hot-ground fault or leakage, then all the devices on that island have an uncontained ground fault, and their grounded parts are energized at mains voltage. Every switch plate cover screw, every machine chassis, all become lethal to touch.  It's the worst possible outcome.  

Isolate the ground wires from the boxes.  This is not necessarily easy, they are bare and will tend to be pushed against the metal parts of boxes and devices.

Consider retrofitting grounds

NEC 2014 made it a lot easier to retrofit just a ground wire, and continue the original cables in service.   Now if you have an island you'd like to ground, you can ground it any which way you can - within some generous limits. 


Not any random water pipe will do, but some will. 
Neutrals can never be promiscuous (shared across more than one circuit*). But retrofit grounds can. So circuit 7 can grab a ground from circuit 9, provided they source from the same panel. 
The pathway must be big enough for the circuit, continuously: so a 20A circuit needs at least a #12 ground (#14 won't do), and a 30, 40 or 50A circuit needs a #10 ground.  Metal conduit of any size is plenty for any of these.   Here's a strategy: first wire a "backbone" ground with #10 to range, water heater, A/C, dryer etc. so you can tap it for other circuits.  likewise run #12 grounds where 15A and 20A circuits are in the same area. 


GFCI is a good band-aid

A great many ground fault problems can also be avoided with a GFCI breaker (or GFCI deadfront or livefront strategically placed).  You still get shocked, but only for a few milliseconds.  



* a MWBC counts as a single circuit, and its breakers better be handle-tied.