Look at where they download games, copy that folder, and then paste it back. For example in Steam, assuming you didn't change the download folder from C:\Program Files\Steam\steamapps, just copy that folder over, and when you reinstall Steam, copy it back. Steam games have a file that tells Steam the game is available, so it should show up and run as if nothing happened. Though you'll have to go through the first-time launch thing.
For other clients like Origin, it's the same thing, but you likely have to "install" the game. If the client is smart enough, it'll realize the game is there and do a file check to make sure it's all there, download/update what the game needs, then launch the game.
If you just want to do specific games, you can copy the game folders as is and put them back where they're downloaded to. For Steam though, getting that file that tells Steam the game was downloaded is tedious, so just have Steam "install" the game and it'll realize it's there.