Replace data array with buffer