This can be done at any robot workbench, which can be built at any friendly settlements after completing the Mechanical Menace quest, and receiving the robot workbench schematics. With the Automatron add-on installed, the Sole Survivor can create and install a variety of robot modifications to Codsworth, Curie (before becoming a synth during Emergent Behavior), Ada, or any number of new automatrons created from scratch.