Add array functino to array module, fix a couple bugs in buffer.copy