Behavior tree AI waypoint

Or just use Last Index instead of Length, since the Length node gives you the number of entries in an array while Last Index gives you the last index in the array.