indexesOf with passed buffer