I created this for use in different rental cars, as nearly all cars should have a sun visor.
The 17mm ball is standard in many smartphone holders and other accessories.
For the extension arms go here or use my ABS print profile, which includes some arms:
modular-mounting-system-gopro-arms-customizable
I used a 30 and 90mm arm.
You will need one M5 screw and nut for every joint.
(aliExpress amazon.de affiliate links)
The first picture shows a slightly different prototype version.
Consider printing in ABS or PETG, as PLA maybe wont survive a hot summer day.