Levenshtein distance for an array.