This forum can be less full service than you might expect, but:
unfold/fold will get you the patches. If you then reshape to batch x (number_of_patches * patch_size) you can apply linear with different weights.
The technical term for this type of layer is “locally connected layer” by the way.
Best regards
Thomas