How do you create the bone/armature structure for a 4-bar linkage?
Generally speaking, you'd create that via IK, which controls angles while keeping lengths constant:

That's your basic parallelogram IK, used for a lot of mechanical rigging. Note that it doesn't have to be a parallelogram-- if you build it with different lengths for your bones, different angles, it still behaves properly.
The IK target (and the first bone of the IK chain) is parented to root, while the last bone, &quot;4&quot;, has a 4-bone-long IK bone constraint targeting the IK target.  No matter how you rotate the bones, the lengths will not change.
To adjust the structure, you rotate the IK controlled bones.