This Saturated Fat below 10% requirement is a direct contradiction of the earlier requirements to include more meat and whole fat dairy. You can't do both.
To be clear, the research appendix claims their review of RCTs does not support SFA intake correlated with coronary events or mortality, and thus does not recommend reducing saturated fat below 10% of energy.
Why not just define a higher level proto that contains all possible (maybe repeated) protos you might want to include? Then if one of the included protos is not present, the higher level proto will efficiently encode that, and nothing gets broken.
I know you mentioned C in your original question, but some of the techniques discussed in low latency presentations at C++ conferences will be broadly applicable. Many are available on line. I have recently watched presentations by Timur Doumler and Fedor Pikus from the last few years that would probably close to what you are looking for.