Use a REPEAT/UNTIL or WHILE loop to iterate the JSONPARSE with an incrementing Array Index, utilizeing the Return Results in a D location (say D99).
In the Help topic for JSONPARSE, it talks about this Return Results D value. The High word will be 0 when the JSON text is good, but your Array Index was not found, e.g. there are only 3 elements in the array, but you passed in a 0-based index of 3. 0, 1, and 2 are valid array indexes in the situation where the record has 3 elements, so when you try to read the 4th (at 0-based index 3), then that tells you you're done.
MOVE 0 V42 // JSON array index, start at 0
REPEAT
JSONPARSE (Lookup by Array Index V42) (Return Result in D99)
STRLE D99:SW1 <= 0 // D99:SW1 is a "cast" which means look at the HIWORD of D99 as a Signed Word, if it's 0 it's done, or < 0 it's in error
OUT C99 // turn on C99 when DONE
STRN C99 // not done?
INC V42 // increment V42 to the NEXT index
UNTIL C99
What's good is that V42 will equal the number of array elements after the UNTIL. So if there are 3 elements in the array, the JSONPARSE will use 0, 1, 2, successfully. When V42 increments to 3 and goes back to the top of the REPEAT, the JSONPARSE will fail when the 0-based index is 3 (i.e. 4th time through the loop), it will set C99, and NOT increment V42 at the bottom of the loop (STRN is a NC contact), hence it will remain equal to 3, the UNTIL will exit the loop since C99 is now ON. And V42 will equal 3 (one beyond the last 0-based index, which is, by definition, the number of items in the JSON array record!)