add support to read arrays in chunks