In reply to DK87:
The foreach construct gets unrolled in a constraint expression, so each element gets individually constrained. But a distribution constraint is only a weighting. What statistical difference do you expect from constraining the array as a whole versus each element?
BTW, the dist constraint you wrote is comparable to writing
arr[I] dist {[0:10]:=9,[20:50]:=74,[70:90]:=17};
make sure you understand the difference between ‘:=’ and ‘:/’.