Arm pain/discomfort is a very difficult thing to diagnoses on a web site such as this. Too many things come into play with this question of yours that we are not privilege to - and not because that’s at fault on your side of things or ours collectively.
The human condition, involving a very complex topic like physical activity, is best address in live time by someone who has experience with observing athletes and all that is in orbit with said observations.
On the other hand to address your question directly, your total body should be involved with the pitching experience - but, trained to do so by “on site” coaching. Sure - we can suggest many things and in what order. But at the end of the day, it’s up to you to understand, apply, and agree on what’s said by actually experiencing the results that are positive and in your best interests.
Another thing that’ll help you tremendously is patience, devotion to physical workouts in reason and guidelines of how and why. Now I’m not connect or associated with any publisher or “how to” author. But, if your really want to study and apply how to progress in this sport and at the pitcher’s position, get yourself a publication called : The TUFFCUFF Strength and Conditioning Manual for Baseball Pitchers. You can order this publication on this web site. It’s worth your time and doing what you need - RIGHT.