First get another figure, hot glue, a metal rod (a part from a coat hanger will do), Play-doh, some pliers, and a candle.

Bend the rod 90 degrees

Have it just as long as the socket is. Leave the excess.

Push the socket into play-doh or sculpey to make a negative impression.
Check the impression. Make sure it looks good. Lightly press the sides of the mold (the play-doh) to shrink the mold size.
Fill impression with hot glue, and then stick in freezer for about 10 mins.
Remove from Play-doh. May need to rinse with water.
Next, heat up the short, bent end of the rod over a candle, and inset into the glue socket.
Bend the wire to match the inside contours of the figure.Add more hot glue to rod.
Test it on an arm to see if it works.
Fill the figure with hot glue and lay him on his side. (Don’t add too much, just enough to fill past the rod when put in the hole. Slide new socket and rod into open hole in your broken figure. Touch up with hot glue and let cool.