Prevent reading past an array.