Method for safely interfacing arduino with variable voltage input signals?

Opto isolators are smaller and cheaper than relays, also you can use exactly the same circuit to work with all the voltage sources that the OP mentioned. See my reply #2.