Text this: Deterministic realization of collective measurements via photonic quantum walks