You may not be able to get ground from the fuse box. My first suggestion for that would be to put it under the mounting bolt for the fuse box.
As for the other wires, you'll just have to test which fuses turn off when the power is off. For a dashcamera, it doesn't matter if you connect the red wire to something that comes on when you open the door, when you turn the key to the first position, or when the engine runs. Similarly, it doesn't matter if that turns off when the engine stops or 20 minutes after you lock the car.
The function of the fuse can give you a guess as to whether it turns off when the ignition is off. However some modules are powered all the time, even though they only work when the ignition is on, and some things like the interior lights will turn off after 20 minutes or so after the car is left and the fuse may then have power removed.
It's best to get a voltmeter and measure the voltages with the ignition on and with the ignition off. If you find a feed that is on all the time, test that it does stay on for half an hour after you lock the car.