Convert array-like data between formats