The below formula will generate an error because the formula creates 2 array elements in line 1 and line 2 and then on line 3 the formula is comparing the 3rd element of the array to the 1st element of the array.  Since there is no 3rd element of the array the ArrayExample[3] will cause the error.

ArrayExample[1] := "Array element 1"
ArrayExample[2] := "Array element 2"
if ArrayExample[3] = ArrayExample[1] then
   "Match found"
   "No match"