Where would one look to find replacement plugs for the electrical and solenoid connections?
This is on my 2004 Mazdaspeed that's turning into a bit by bit restoration of under hood items. This particular one is the solenoid for the A/C cooling fan at the radiator (MSM's have two, two speed fans, one for the A/C and one for engine cooling, mounted side by side.)
Some of mine are corroding, the wires falling out the back of the plug.
See photo for an example. Note the wire that fell out the back of the plug.

In reply to jharry3 :
The actual metal contact is a standard AMP type crimp connector that pushes into the white nylon cage. Removing the failed original piece requires a tool to depress the tag the keeps it in the cage when assembling it to the male side. These are common everywhere and occur in 3 sizes. For your small quantity need probably McMaster -Carr. Like this https://www.mcmaster.com/69525K66
The connector housing looks OK, I'd try to just replace the connection by replacing the pin. A good crimper would be worth the investment if you do much of this type of work.