Threepio remarks to BB-8 that he needs to get his proper arm reinstalled on as they walk away from Han and Leia in that same scene. Very easy to miss (didn’t notice until I think the fourth time I saw it).
As for him getting the gold arm back, I’m 90% sure there’s a scene where that happens that was cut for pacing. The one thing that confuses me is why not digitally make Threepio’s arm red in that last shot of him? Because it’ll be strange if he’s back to golden arm next movie after spending the whole film with the red, but it’ll be a continuity error if he keeps the red.