How could you put socks on with a broken arm?

Very carefully. Very carefully; try to get assistance if available. You may also want to buy some ankle length socks as they may be easier for you to manipulate them with your fingers (which I presume are not casted) if there is any doubt please contact your physician/orthopedist for further advice/assistance.
OT. Talk to an occpational or physical therapist or go to a surgical supply store that sell assistive aids. There are devices that hep with shoes and socks. Though design for those who can't bend over after either hip or back surgery, they will aid in this purpose. There are also many aids for toiling and self care that help those with shortor injured arms.