Serialize sets as if they were arrays