Pattern-Aware Chain-of-Thought Prompting in Large Language Models