You may have tendonitis or bursitis, commonly known as shoulder impingement in your shoulder, rotator area and the upper arm is getting referred pain.
There are exercises to help strengthen the shoulder and keep it fluid in order for it not to freeze.
Search for shoulder impingement exercises...