I saw where they put scallions in an egg carton to grow
I grow then in pots in my back yard.
Have never done this, but you could give it a try. Mine are in a raised bed.
This would be only to get the germination of the seeds started. Once the seedlings were visible above the surface of the soil, they would need to be transplanted into deeper soil, in pots, or in a garden. The depth and size of the egg carton indentations would not be sufficient enough to provide adequate space for the roots to grow into maturity.