Melt butter in a skillet over medium heat. Once the butter is melted, add the onions and cook until tender, 3 to 5 minutes. Then, stir in the flour, garlic, mustard powder, turmeric, and paprika. Cook for 2 minutes, stirring regularly.
Pour in the milk and cheddar shreds. Stir this together over medium heat and bring it to a simmer. Stir until the cheese melts and the sauce thickens.
For frozen broccoli: set it out to let it thaw slightly. For fresh broccoli: add bite-size broccoli florets and pieces to boiling water and cook for 2 to 3 minutes until just becoming tender. It will cook more as it bakes. Remove it from heat and pour it over a colander in the sink to drain the water. Be careful because the water will be hot.
Portion out 1/2 cup of the cheese sauce mixture. Pour the cooked rice and broccoli in with the remaining cheese sauce and stir it together. Transfer it to a casserole dish. Drizzle the reserved sauce over the top. Bake for 30 to 35 minutes, until the top is golden brown around the edges. Allow it to cool for 5 minutes before serving.