how to handle multiple forloop?

You can do something like this

public function getStuffDone() {

    $order_ids = array( 358,368 );

    $items = array(); // contains the names

    foreach ( $order_ids as $order_id ) {

        $order = wc_get_order( $order_id );

        foreach ( $order->get_items() as $item_values ) {

            $items[ $order_id ][] = $item_values->get_name(); // add the name to the array
        }
    }

    return $items; // array containing all the names
}