add compact for array.