We apply ideas from $C^*$-algebra to the study of disordered topological insulators. We extract certain almost commuting matrices from the free Fermi Hamiltonian, describing band projected coordinate matrices. By considering topological obstructions to approximating these matrices by exactly commuting matrices, we are able to compute invariants quantifying different topological phases. We generalize previous two dimensional results to higher dimensions; we give a general expression for the topological invariants for arbitrary dimension and several symmetry classes, including chiral symmetry classes, and we present a detailed $K$-theory treatment of this expression for time reversal invariant three dimensional systems. We can use these results to show non-existence of localized Wannier functions for these systems. We use this approach to calculate the index for time-reversal invariant systems with spin-orbit scattering in three dimensions, on sizes up to $12^3$, averaging over a large number of samples. The results show an interesting separation between the localization transition and the point at which the average index (which can be viewed as an "order parameter" for the topological insulator) begins to fluctuate from sample too sample, implying the existence of an unsuspected quantum phase transition separating two different delocalized phases in this system. One of the particular advantages of the $C^*$-algebraic technique that we present is that it is significantly faster in practice than other methods of computing the index, allowing the study of larger systems. In this paper, we present a detailed discussion of numerical implementation of our method.