Ah sorry i should have been more clear.

The array is set to ignore values of 0 intentionally so as to speed up evaluating larger values. The values of 0 are distances to other enemies stored in the list but are too far away so are then set to 0 (could set them to 999999 though)