a = lut[arr] would malloc memory is there a method like this: np.lookup(arr, lut, out=a)?
Try numpy.take(lut, arr, out=a).
numpy.take(lut, arr, out=a)