You are given an array of strings only (could be words, phrases etc). Create a function to find all the anagrams within that array. The output should be an array where each element in the array is itself an array of anagrams.
const words = ['cat', 'act', 'ignore', 'a phrase', 'tape', 'pate', 'e hpsara'];