Loop over variant types to reduce duplication