How to retain the smell of frying green onions/scallions in cooked dish?
You were probably having a dish with green onion oil, something I'd also recommend as a solution to the smell/taste you're looking for.  It remains aromatic for a couple weeks after you make a batch and bottle it. I make one with darker brown onions like this, which allows me to store it even longer.