MathUtils.as - get next and previous elements in array.