Add mask band to product

Let’s say I’ve got a Landsat 8 OLI, Sentinel 2 MSI or Sentinel 3 OLCI L1C product. From another data source, I want to add a mask band (having the same extent and cell size), that I can later use in operators such as C2RCC.

Is there any way, preferably using GPT, to perform this?