Increasing shoulder flexibility can start with scapular awareness exercises.
The scapula is designed to move relative to the ribcage to allow the arm more freedom of movement at the shoulder.
You could think of shoulder flexibility as a combination of moveability of the scapula relative to the ribcage as well as moveability of the upper arm relative to the shoulder blade.
Shoulder Blades: Retracted, Protracted, Supraverted (shoulder sockets looking upwards.)
If scapular moveability is restricted then shoulder movement will also be restricted.
For most non-binding postures:
Other movements of the shoulder blade are elevation and depression.
For hands free positions (as opposed to movements where one or both arms are being used to support some portion of the weight of the body) you can try leading any arm movements with a movement of the shoulder blade.
As an example,
These are all muscle assisted shoulder flexibility exercises. And they all (except for one) focus on moving the shoulder blade first.
Once you have a feel for the shoulder blade you can then try similiar action in yoga shoulder flexibility positions where one arm helps the other arm.
To clasp the hands behind the back and then lift the arms, you can first start with the elbows bent and hands clasped behind the back.
Aim to keep the palms together.
2. Shoulder blades Retracted
3. Arms lifted with upper arms internally rotated.
Move the shoulder blades together first.
Then straighten the elbows (one arm at a time can sometimes be easier).
Then see if you can lift the arms while making them feel long.
Previously when reaching the arms back the focus was on retracting the shoulder blade first.
However, with the hands clasped the shoulder blades don't need to retract so much since the hands are being used to hold the arms together.
And so you can experiment with spreading the shoulders blades slightly.
You may find that your shoulders move slightly forwards, ahead of the chest.
Another way to do this type of stretch is to hold onto a towel or belt.
Pull the arms outwards to add tension to the belt and then lift your arms.
Try it with palms facing each other, palms facing back, palms facing forwards (or down as you lift the arms).
You can even try it with palms facing outwards.
This is to increase shoulder flexibility with any rotational position of the upper arms (and forearms.)
Going back to the arms clasped shoulder flexibility stretch, I find that I often get the most stretch by moving the backs of the upper arms outwards,
internally rotating the upper arms. I find that this action feels like it spreads the tops of the shoulder blades slightly.
It may also use the pectoralis minor muscle.
Assisting the shoulder flexibility stretch with the arm across the chest you can use the other arm to pull the arm being stretched inwards.
For this shoulder flexibility stretch, you can relax the arm being stretched and continue to focus on moving the shoulder blade outwards.
An alternative is to push the arm outwards.
If stretching the left arm, then push it outwards and resist the right arm.
And now in this case focus on pulling the shoulder blade inwards.
To get into the stretching position first move the shoulder blade outwards.
Then when you resist the stretch move the shoulder blade inwards.
For arms up over the head, you could try clasping the arms overhead.
To begin with focus on lifting the peaks of the shoulders.
Keep the neck long as you do so.
Prior to clasping the hands reach the shoulder and arms up and keep the elbows straight.
Bend the elbows if you need to, to clasp the hands, then reach the arms up again, and straighten the elbows as you do so.
Try pulling down on the arms to resist the stretch and at the same time act to pull the hands apart. (without actually doing so.)
To vary the stretch feel the outside of your shoulders and move the tension forwards or backwards.
You can try moving the arms back to deepen the stretch.
A popular position for improving shoulder flexibility (one could suggest that it requires shoulder flexibility) is called cow face in yoga.
One arm reaches up the back and the other arm down the back with the idea being to clasp the fingers.
Retract the shoulder blade (for lower arm),
rotate arm inwards,
reach hand up back,
For the downmost arm, move the shoulder blade inwards.
Reach the arm back and internally rotate it, then bend the elbow and reach the hand up the back.
It can feel logical to bend the ribcage forwards.
I'd suggest keeping the chest lifted and open.
To get the arm into position you may have to wiggle the shoulder blade outwards and then inwards again repeatedly.
You may find it helps to rest and then repeat this process a few times.
For the upper arm pull the peak of the shoulder blade upwards and reach the elbow up (elbow can be bent or straight) and then reach the hand down the back to clasp the other hand.
If you can't claps the hands you could hold onto a towel of belt.
If you are lucky enough to be able to clasp on one side, then focus on the feelings of tension in the shoulder as you move into the good side.
Notice what you do with the shoulder blade and the tension when you rotate the arm. (Is it close to the head of the arm bone?).
Notice how you hold your ribcage.
When doing the bad side, move slowly and focus on creating the same sensations.
If you notice tension that isn't present on the good side then stop and work to release that tension before progressing.
Limited shoulder flexibility may be a result of injury or non-ideal movement patterns that have been programmed into your brain.
Moving slowly is one way to notice these movement patterns so that you can then work at changing them.
Another type of shoulder flexibility stretch is to put both hands in prayer behind the back.
Reverse Prayer: Spread shoulder blades. Bring hands towards each other. Retract Shoulder Blades. Lift/Open Chest
Initially spread the shoulder blades and internally rotate the arms.
Then bend the elbows and put the edges of the palms together behind the back.
Then retract the shoulder blades and pull the elbows back.
Open the chest.
One possible counterpose is eagle arm position.
Eagle Pose for the arms: Spread shoulder blades, cross one arm over the other (rear view then front view), cross forearms.
For eagle arms, spread the shoulder blades as you cross one arm over the other in front of the chest.
Bend the elbows and externally rotate the upper arms to clasp the hands with palms facing each other.
This shoulder flexibility stretch has a few variations.
You can try lifting the elbows and or tilting the arms to one side and then the other.
Once you've got the hang of these shoulder flexibility stretches in isolation you can use them in combination with hip stretches like yoga pigeon pose.
For pigeon pose you have to make sure that your legs create a stable foundation. Then you can take your hands off of the floor and stretch the shoulders.