Constrain sum of elements in an array

In reply to naveensv:

Please explain your point regarding sum() constraint in more detail.