def check_if_tables_exist(metadata, table_names):
    """
    Return array with booleans if corresponding table exists.

    Parameters
    ----------
    metadata : sqlalchemy.sql.schema.MetaData
        Collection of metadata entities like Tables and Columns is stored in
        MetaData. This is used to access the datbase. More information here
        docs.sqlalchemy.org/en/13/core/metadata.html.
    table_names : :obj:`list` of :obj:`str`
        List of the table names to check.

    Returns
    -------
    tables_exist : :obj:`list` of :obj:`bool`
        List of boolean. "True" means the table exists.

    """
    tables_exist = []
    for table_name in table_names:
        if table_name in metadata.tables:
            tables_exist.append(True)
        else:
            tables_exist.append(False)
    return tables_exist