Properly pack arrays