Maximum distance from Arduino ports to sensors

I think the Vin can be protected going out to the switch.

I'm no the fence about the opto. I know it won't hurt but I'm not sure it will be of much help.

The key is to keep the resistances low to reduce pickup. I would consider using a SPDT switch and have the signal switch from Vin to ground. This would leave no open wires. Of course the protection resistors (and capacitors) would have to allow all three wires to be shorted together and not hurt anything.

Would the 24V be a 2nd source?
No I don't think there is a need for 24 unless it was isolated from the Vin.

Keep in mind you have a "slow" signal. Its not like an I2C or RS232 signal.