Cleaned up and spread the array-or-not functionality