accumArray package:bitwise

Create an array by accumulating a list of (index, operand) pairs from a default seed with an operation.