Beyond Pattern Recognition: Probing Mental Representations of LMs