Split categories into array.