Gather rows from input along dim using integer indices. Primary use: embedding lookup (dim=0, indices=token IDs).