ArrayBuffer creation and printing