I think the cable pull-downs at the gym were what kept my shoulders healthy. I tried lifting dumbells from overhead while lying on my back to simulate the directionality, but it still puts on too much of a compression load.
I'm thinking of trying to rig something up in the basement using the pulleys and line from my windsurfer down-haul.
Depending on what your shoulders need - my trainer introduced me to the Iron Scap protocol. As the name implies, it's a way of strengthening the scapula, and it has really helped with my impingement. I attach them to a rack, but I imagine you could screw eyebolts into two studs or something like that. It uses CrossOver Symmetry bands. I use purple and red (7 and 15 pounds) - for the ones using the harder bands, I could probably graduate to the next level, but the lighter weight ones are still a lot of effort.
(I was going to put an Amazon product link, but the site tried to interpret it as a media file.)
Someone already put the picture out in the world: https://i.pinimg.com/originals/0f/26/4b/0f264b881f3a4943006d49c30b757f78.jpg .. I think it comes with one of the kits, but I can't see paying extra for what really should just be on a piece of paper along with the bands.
YMMV, I'm not a doctor or physical therapist, etc etc.