As you can see on the video the lens remains at the same position- the arm is a pano head.
Exactly. Absent dedicated hardware (i.e., a pano head), the NASA staff programmed a series of discrete sequential robotic movements, probably at least hundreds and perhaps thousands, then transmitted them up to Mars rover so the arm would move the optical system around the nodal point in order to create a series of images that could be seamlessly stitched.