Improve mapping of nested arrays.