Method that takes array of strings and returns array of their lengths