$post_id = 42;
$rows = array_map(
static fn ( $row ) => $row->toArray(),
ugly_rows( 'team', $post_id )
);
$rows[] = array(
'name' => 'Marta',
'role' => 'Waiter',
);
ugly_update( 'team', $rows, $post_id );Read the rows, convert each one to an array, add yours, and write the whole list back.