duplicate

Duplicates the buffer, sharing the underlying array and preserving the state.