Preheat your oven to 375F. Then, bring a large pot of water to a boil and add the green beans. Blanch the green beans for 4-5 minutes, or until slightly tender but still crisp.
Immediately transfer the green beans to an ice water bath, drain, and set aside.
Then, heat two tablespoons of olive oil on medium high heat in a large pan. Add the diced onion and sliced mushrooms and cook for 8-10 minutes, or until soft.
Stir in the tamari soy sauce, minced garlic, salt, and pepper. Then add the chicken broth and milk, and simmer for 5 minutes.
Make a slurry by stirring the arrowroot powder with 2 tablespoons of water in a small bowl. Turn off the stove, pour the slurry into the pan, and stir until the sauce has thickened.
Transfer about 1/3 of the mushroom sauce to a baking pan, add the green beans on top, then top with the remaining sauce. I put the sauce down the middle for presentation, but you could spread it evenly across the top. Then bake for 10-15 minutes or until warmed through.
While the green beans are baking, add the sliced shallots to a pan with 1/4 cup or so of olive oil. Heat on medium high heat for 5 minutes, stirring the shallots, then reduce the heat to low and cook for another 3-4 minutes. Keep a close eye on the shallots after 7-8 minutes, as they go from golden to burnt very quickly.
Once the shallots are lightly golden, remove them to a paper towel lined plate.
Remove the green bean casserole from the oven, top with the crispy shallots and serve.