Trying to find a faster way of selecting values in an array.