"for i := 0 to arrayProperty.count - 1 do",
you should debug printing on screen what value is "i" geting the first time interaction,

I think "i' have to be signed so it can get -1 value; if it is defined as unsigned type (word, byte, longword, etc) then you will get a problem.

"arrayProperty.count - 1" should return -1 when arrayProperty.count = 0 if this is not returning a signed type then you are having a problem;