Here is an idea to bring back rocks that does NOT need a third motor.
The arm is just balanced upright as the bot moves forward but drops
when the bot stops
because it continues forward by inertia.
The program is simply move forward and then back.
Works!
Now get the timing right.
And get the starting angle right.
The challenge is to get all four rocks in the shortest time.