Input selection for dry contact vs pnp
If the dry contact is floating, just wire it as if it were a PNP - now you are analyzing a single type of input - a contact (or BJT) that pulls-up to 12 volts.

I would use an opto with its LED in series with a current limiting resistor and connect this between PNP (or dry contact connected to 12 volts) and ground: -


If you can't take the dry contact to 12 volts then you can still use the opto method but the anode of the opto would connect to 12 volts and the resistor (R1) would connect to the dry contact (or NPN equivalent).

R1 is chosen so that about 20 mA flows when the dry contact or PNP closes.