Attempted to access index 50 from array with length 50!

The “For Loop” node is special. Both First Index and Last Index are inclusive. So you can’t just feed it the length of the array.