This is something I have never done, and I only read about this on the yojoe.com forums. Personally, unless the figure was very rare or irreplaceable, I would simply take it apart and try to find a replacement limb cheap somewhere. However, if you want to try this, here is what I learned:
You want a rivet that is called a “Tubular Aluminum Pan-Head (flat or round) with a 1/16″ diameter shaft, 1/4″ grip and 1/8” head.
The most popular place to get these seems to be http://www.rivetsinstock.com
The following was copied directly from a yojoe.com post. If the rivet you are replacing is broken (the one in the steps below is if you want to reuse the same rivet) just use a new rivet when he says to reinsert the old rivet (Rivet pliers would probably not hurt to have, either):
To remove an ARAH elbow rivet (you could probably apply this to shoulders too, haven’t tried it):
1. Clamp the arm in a vice tightly enough that it won’t pop out, with the concave (where the rivet faces inward) face up.
2. Next you’ll need a small nail or a narrow Phillips head screwdriver and a hammer. Insert the tip of the nail/screwdriver into the rivet and tap lightly with the hammer until the rivet pops out. If all goes well it’ll form itself onto the end of the nail/driver and you won’t lose it. Above all, DON’T LOSE IT! If you do you’ll have to get one from another arm but then you’ll be stuck with an arm with no rivet.
3. To replace, reinsert the rivet back through the hole (you may need to squeeze with pliers to get it all the way through). Lay the arm down so the head of the rivet is flat against the table or other hard surface.
4. Using a larger nail or screwdriver than in step 2, tap down on the rivet (same as in Step 2 above). This will spread it back out and hold the lower arm in place once more.
I’ve done this numerous times (mostly to sand the joints between elbow/arm for painting) and it works great. The risk is some older RAH figures have grown brittle and the joint can break when you apply any pressure.