def convert_array_to_dictionary(x, y, int_to_topic_code):
    """
    Convert data in array format to a dictionary keyed by topic code.
    
    :param x: the array of articles.
    :param y: the integer indexes of the topic classes.
    :param int_to_topic_code: dictionary of integer indexes to topic codes.
    :returns: a dictionary keyed by topic code with items a list of the articles for that topic.
    """
    dictionary = {}
    
    for index in int_to_topic_code.keys():
        dictionary[int_to_topic_code[index]] = x[y == index]
    
    return dictionary