Java 10, 96 8989 86 bytes
(a,b)->b->{var r=newint int[b];intr[]=new int[b],i=0,n=a.length;for(;i<n;)r[i/((n+b-1)/b)]+=a[i++];return r;} Found a shorter way to write i/(n/b+(n%b==0?0:1) here: i/((n+b-1)/b)
Thanks to Olivier Grégoire for golfing 3 bytes.
Ungolfed version:
(input, -> bins) -> { // takeinput anis int[] as first parameter (original array), an intbins asis secondint (number of bins) varint resultresult[] = new int[bins];int[bins], // resulting array, initialized with all 0 int i = 0, // for iterating over the original array n = a.length; // length of the original array for(; i < n ;) // iterate over the original array result[i / ((n + bins - 1) / bins)] += input[i++]; // add the element to the right bin; that's bin n/bins if bins divides n, floor(n/bins)+1 otherwise return result; }