Can now pass in an array to fill. Avoids (relatively slow) allocation of new arrays for each pixel