Im not sure why you cannot accomplish what you need in the foreach loop though. If you updated your question with a bit more info we could probably help you debug the initial foreach loop. Also if your using MVC 3 i recommend the Razor view engine, the syntax is a lot nicer.
The for loop equivalent:
<% { var locations = (List<Location>)ViewData["terr"] } %>
<% for (int i = 0; i < locations.Count(); i++)
{ %>
<input type="checkbox" name="terr" id="<%: locations[i].Location_Id %>" value="<%: locations[i].Location_Id %>" disabled="disabled"/>
<span id="<%: locations[i].Location_Name %>"> <%: locations[i].Location_Name %> </span>
<br />
<% } %>