How to add or remove metabox each page separately?

Here is a function that you can pass either a single post id or an array of ids. Call this function in your function that adds the meta boxes. If the id or ids don’t match the meta boxes will not display on that post or page.

function check_id( $id ) {
    // Get the current post ID
    if ( isset( $_GET[ 'post' ] ) ) $post_id = $_GET[ 'post' ];
    elseif ( isset( $_POST[ 'post_ID' ] ) ) $post_id = $_POST[ 'post_ID' ];
        if ( ! isset( $post_id ) )
            return false;
    // If value isn't an array, turn it into one
    $id = ! is_array ( $id ) ? array ( $id ) : $id;

    // If current page id is in the included array, display the metabox
    if ( in_array ( $post_id, $id ) )
        return true;
    else
        return false;
}

 function myplugin_add_custom_box() {
    $what_page = check_id( array( 3, 18, 15 ) );
    if ( false == $what_page ) return;
    add_meta_box( 
        'myplugin_sectionid',
        __( 'My Post Section Title', 'myplugin_textdomain' ),
        'myplugin_inner_custom_box',
        'post' 
    );
    add_meta_box(
        'myplugin_sectionid',
        __( 'My Post Section Title', 'myplugin_textdomain' ), 
        'myplugin_inner_custom_box',
        'page'
    );
}