Accessing array elements (get_pages)

The return set of $children is an associative array. So you can get the IDs with:

$children = get_children( $args );

foreach ($children as $k => $v) {
    echo $k;
    // do stuff with $v
}