Classification of crystalline topological insulators through $K$-theory