Cut four pieces of heavy duty aluminum foil, about 15 inches long (if using regular aluminum foil, double it).
Divide onions and green beans between the foil pieces, layering onions on top and green beans next.
Drizzle olive oil on vegetables and sprinkle with salt and pepper.
Layer a fish fillet on top of each vegetable pile. Combine butter, garlic, salt, pepper, and optional red pepper flakes and spoon over fish, dividing evenly.
Top each pile of fish and vegetables with two thin slices of lemon and wrap foil around ingredients, folding edges to seal well.
To Grill: Preheat grill to medium high and place packets directly on grill. Close cover and cook 1/2-inch fillets about 15 minutes (until fish flakes easily with a fork). Cook thicker fillets longer as needed.
To Bake: Place packets on a baking sheet in a 400 degree oven for about 20 minutes, until done.
Carefully unwrap packets, being careful of steam and serve in the packets on individual plates.
You can substitute green beans with: asparagus, thinly sliced carrots, sliced sweet peppers, chopped cabbage, or kale (or anything you think would be good!).