You match up the wires to the connector...
As for the metal bracket floating around... It should be spot welded to the tank. Its an anti-slosh (breakwall) around the pump. Others will experience fuel starvation on roadcourses when this happens.
Dont know if you can just JBWeld it back in place...