It sounds quite simple to me. Just put a code on the envelope stating party membership. Job done. Colorado tried holes in the envelope which revealed the red markers on Republican votes. Another ploy was to mark envelopes with R and D. When they was pointed out they stopped doing it but there are many other ways to place an ID on an envelope.