def get_array_of_field_values_matching(field_names, matchop, collection_obj):
    """Returns an array with all values the given field takes in all documents
    matched by the given Matchop in the given collection."""
    push_dict = {field_name : "$" + field_name for field_name in field_names}
    agg_pipe = [
        {'$match' : matchop},
        {'$group': {
            '_id': None,
            'values': {
                # '$push':  {'value': "$" + field_name}
                '$push': push_dict
            }
        }}
    ]
    return collection_obj.aggregate(agg_pipe).next()['values']