In reporting tools like Crystal Reports, there are ways to take denormalized data and group it by a particular column in the data, creating row headings for each unique item
If your view is strongly typed, you can use the LINQ GroupBy extension method with nested foreach:
<% foreach (var group in Model.GroupBy(item => item.Category)) { %>
- <%= Html.Encode(group.Key) %>
<% foreach (var item in group) { %>
- <%= Html.Encode(item.Data) %>
<% } %>
<% } %>
This will provide output much like your formatted lists in the original question. It assumes your model looks something like:
public class ViewModel
{
public string Category { get; set; }
public string Data { get; set; }
}