Factor out getArray() for easier JSON parsing

4 jobs for !1581 with 2231-file-api in 14 minutes and 45 seconds (queued for 9 seconds)
detached