better api for ArrayBuffer and ElementArrayBuffer