How to get an array with all categories and corresponding names?

This part of code from the question will fetch only parent category because 'parent' => 0, drop this from array if you need all the categories

$categories = get_categories( array(
    'orderby' => 'name',
    'parent'  => 0
) );

// You can iterate over the list of objects returned by `get_categories` 
// to achieve list of categories in required format.

$category_list = array();
foreach( $categories as $category ) {
    $category_list[$category->slug] = esc_html__( $category->name, 'kirki' );
}