Most buildings can easily be pressed into service as impromptu firebases. Most have plenty of windows, doors or otherwise gaping holes in the structure through which a warrior can poke a crossbow or other such ranged weapons. Even if there aren't any pre-existing firepoints in a building, the garrison can normally knock their own loopholes in the wall as needed.
A garrison unit can shoot in the Shooting phase, tracing line of sight from any point on the building. The forward arc of the garrison unit is assumed to be 360 degrees (i.e. all around) so we don't need to worry about that either. The range for a garrison's shooting attacks is always measured from the closest point of the building. Note that War Machines must still pivot on the spot as normal.