prefixSums and unchunk for process/append3

These were also copied from master unchanged.