Constrain sum of elements in an array

In reply to georgean:

Just FYI. This is already solved under Constraint randomization of an array | Verification Academy. Maybe you can complement the information shown here.