Handle arrays in submit and render #5877