One approach may be to create a controller action, partial view and view model for your menu and then call that from the master page.
<% Html.RenderAction("Menu", "MasterPage"); %>
In the example above, MasterPage is a new Controller for anything that you might want to be able to control a bit better. And Menu is the action that will take care of gathering the data (from any source) and passing it to the View using the view model.