Changing height of an UI panel using Array content
It could be written as : 

var graphBars = new[] { GraphBar1, GraphBar2, GraphBar3, GraphBar4, GraphBar5, GraphBar6, GraphBar7, GraphBar8, GraphBar9, GraphBar10 };
for (int i = 0; i &lt; graphBars.Length; i++)
    graphBars[i].GetComponent&lt;RectTransform&gt;().sizeDelta =
        new Vector2(50, oScript.reactionTimeArray[i] * 1000);