Classification of topological phases with finite internal symmetries in all dimensions