An articulated arm includes an arm segment, the segment attachable to at least one other segment of the arm; a ball-and-socket joint at a distal end of the arm segment, a ball of the joint including a plurality of indentations that are distributed over at least part of the surface of the ball; a rod that is slidable within the arm segment, the rod including at least one pin at its distal end, each pin of said at least one pin being configured to be inserted into an indentation of the plurality of indentations that is aligned with that pin; and an actuator mechanism that is configured to apply a distal force to slide the rod distally to insert each pin of said at least one pin into an indentation of the plurality of indentations.