Changing array to arraybuffer for arrLeafSet