You can get magnetic sensors, but most of the type used are ferrous metal proximity detectors, although there are type that will sense non-ferrous also.
The open collector 3 wire come in PNP & NPN (sink/source).
If you are using them in an application that inputs into relatively high impedance, such as logic input etc, the 2 wire type can be used, the three wire are only necessary if an appreciable load is being switched.
The advantage with the 2 wire is that they can be used in a sink or source input.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.