The following applies to USGA Championships, but I’m sure the Masters does it Ina similar fashion. While I’m sure everyone does there best to get it back correctly, there is no need to use GPS or antpything like that.
Each hole official or walking referee has a Suspension of Play card. When play is suspended for the night, the official notes where every ball is located on the card and how it is marked. This data is entered into a spreadsheet which is given to the superintendent. For balls on the green, the green mower is accompanied by another person. He will lift the marker while the mower (and roller) move over that location and then replace it. The amount of error is minimal (well less than a inch).
I’ve also seen them putt tees in the green and push them below the surface so the mower doesn’t hit them and then replace the marker after that.
For balls in the fairway we might not mow fairways or do something similar if it was really desired.
Typically you try to blow the horns for a non-dangerous suspension early enough that most players will finish the hole, but there are always a few who don’t. When it is lighting you can end up with a lot of balls out there though.
Even if the marker is moved or the ball taken (presuming the players didn’t have time to mark when lightning) the Rules say the player should use his or her reasonable judgment to replace the ball in the original location.