My gaming office chair's armrest was broken for a while, and when I checked the company's website, the replacement armrests seemed too expensive in my opinion. So, I decided to take the broken part as a reference and made a slightly smaller version. It can move in 2D (back and forward, left and right). It can be improved, but for now, it solves my problem. Feel free to remix. (TW: Trypophobia). Yes, the screw holes are misaligned, but in the end, it worked out well because it prevents the upper part from being put on incorrectly. I used wood screws, though I'm not sure about the exact size. You can use any screws you have lying around.
Last photo is my armrest mechanism if you have similar one it could fit with messing around with scale.
The author marked this model as their own original creation.