You can get FPGA-based switches, e.g. from Arista. They're not cheap, but you can do whatever you like with the packets as the bytes arrive. But for most applications you'd stick with commodity cards for the cost.
FPGA-based switches from Arista are a gimmick of that particular vendor. 10G ethernet and beyond is absolutely commodity in the FPGA world, every dev kit has one.