There are generally two ways to get a collection of WebApplications in a farm, so you can loop over them. When you use one of the methods below …

SPWebService.ContentService.WebApplications
– or
SPFarm.Local.Services.GetValue<SPWebService>().WebApplications

…, you will notice that the Central Administration WebApplication is not included.

To get a reference to that one, you need to use the WebApplications Collection of the SPWebService.AdministrationService. Most developers can easily make a merge of both collections to loop over all WebApplications.