lets say I have the following array: [1,2,3,4,5,6,7,8,9,10] I need to define a new array in a way that: for i=1, the first element of this new array will have the sum of