Copper Water Pipes used as Electrical Ground
You'll want to consult a licensed electrician in your area, but you can probably simply bond a 12 or 14 gauge bare copper wire to the copper pipe on either side of the section you replace with PEX to maintain the preexisting continuous ground.

Pay more attention to the first part of this answer than the second part.