Iterate through an array and average the values in it. However, for each array entry, I want the loop to check against a global
variable to determine whether or not it is considered in the averaging. Thus each array entry will actually have a checkbox
where the user can select whether said entry is condsidered in the averaging.