extra: handle arrays better using the chunk code