Given an array nums, return an array where each element at index i is the sum of all elements from index 0 to i.