Preheat oven to 375F
If using almonds, toast in a pan over very low heat
Cook 2 lbs green beans in a large pot of salted boiling water, working in batches as necessary. Cook until bright green and halfway to tenderness, about 3 minutes per batch. Drain and let cool. Trim stem ends
Melt butter in a large saucepan over medium low. Whisk in flour, cooking until roux is golden brown and smells nutty, about 4 minutes. Whisk in milk and cream slowly. Increase heat and bring to a simmer, cooking until béchamel is thick and bubbling. Remove from heat and whisk in garlic and parmesan. Season to taste with salt and pepper
Arrange green beans in a 2 quart baking dish. Pour sauce over the bean mixture. It may not look like enough, but it is! Cover tightly with foil and bake until sauce is bubbling, 25-30 minutes. Uncover and bake until lightly browned on top, another 15-20 minutes. Top with almonds and onions, then bake for another 3-5 minutes. Let sit 10 minutes before serving