"edit" a bone in pose mode
You can use a transform constraint on the extendable arm bone to turn the control's movement into scaling. 
You will want something like the following settings:



You only care about translation on the bone's Y axis, so local space and only a y range. The size of the range specified for location (i.e. the Max position) controls how rapidly the control will move the upper part of the telescoping arm.
unused scales should be 1 -1 ranges not 0, or things can disappear.
scale in local Y space again, along the bone's axis. Scale minimum will need to be tweaked for the appropriate rest position.


As you are scaling the bone this can get inherited by child bones, which you don't want, so make sure that for all the children you uncheck the inherit scale option in the relations section:


Depending on how you are attaching your model to the mesh, you may wish to add two child bones to the extending arm to position each part. The lower part can have a copy rotation to the scaling bone, and the upper part can be parented to the scaling bone. In my blend file I have added two smaller bones derived from the main arm are just there to define the position of the two parts or the arm in the armature. This can be useful if you want to rig other parts that need that information, and allows you to use an armature modifier and vertex weights if you need to export to a game engine.

Example blend:
https://drive.google.com/file/d/1Ee_ZH70Mk4e2HfVfx3BCoHiKV6tqwcc_/view?usp=sharing