Convert objects to arrays.