magento2.3.3 – Need to create multiple programmatically customized options

I want to create some custom option by code, and my code does not work correctly, I have a problem, it is creating only one option that is in the last index of options matrix and that has all the values ​​of other options.
here is my code


        
    ```

observer-

_options = $options;
    }

    public function execute(MagentoFrameworkEventObserver $observer)
    {
        $attributeslist = ('center_stone'=>'1',
                        'accent_stone'=>'2',
                        'stone_3'=>'3',
                        'stone_4'=>'4',
                        'stone_5'=>'5',
                        'metal'=>'6',
                        'metal_2'=>'7',
                        'metal_3'=>'8');

        $product = $observer->getProduct();
        $attributes = $product->getAttributes();

        $attribute_array = ();
        $i = 0;
        foreach($attributes as $collection)
        {
            if(array_key_exists($collection->getName(),$attributeslist)) {

                $option_title = $collection->getFrontendLabel();
                $selectedData = $product->getAttributeText($collection->getName());

                if(!empty($selectedData)){
                    $attribute_array($i) = ('sort_order' => $attributeslist($collection->getName()),
                                    'title' => $option_title,
                                    'price_type' => 'fixed',
                                    'price' => '0',
                                    'type' => 'drop_down',
                                    'is_require' => '1');
                    $k=0;                
                    if(gettype($selectedData) == 'array'){
                        foreach ($selectedData as $key ) 
                        {                    
                            $attribute_array($i)('values')() = (
                                            'title' => $key,
                                            'price' => '0',
                                            'price_type' => 'fixed',
                                            'sku' => '',
                                            'sort_order' => $k,
                                            'is_delete' => '0',);
                            $k++;          
                        }
                    }elseif(gettype($selectedData) == 'string'){
                        $attribute_array($i)('values')() = (
                                            'title' => $selectedData,
                                            'price' => '0',
                                            'price_type' => 'fixed',
                                            'sku' => '',
                                            'sort_order' => $k,
                                            'is_delete' => '0',);
                        $k++;
                    }
                    $i++;
                }
            }
        }

        foreach ($attribute_array as $arrayOption) {
            $option = $this->_options
                ->setProductId($product->getId())
                ->setStoreId($product->getStoreId())
                ->addData($arrayOption);
                $option->save();
                $product->addOption($option);             
        }
    }
}

here is my arrray

```Array
(
    (0) => Array
        (
            (sort_order) => 1
            (title) => Center Stone
            (price_type) => fixed
            (price) => 0
            (type) => drop_down
            (is_require) => 1
            (values) => Array
                (
                    (0) => Array
                        (
                            (title) => bluediamond_fancydeep
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 0
                            (is_delete) => 0
                        )

                    (1) => Array
                        (
                            (title) => bluediamond_fancygrayishblue
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 1
                            (is_delete) => 0
                        )

                    (2) => Array
                        (
                            (title) => bluediamond_fancyintenseblue
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 2
                            (is_delete) => 0
                        )

                )

        )

    (1) => Array
        (
            (sort_order) => 3
            (title) => 3rd Stone
            (price_type) => fixed
            (price) => 0
            (type) => drop_down
            (is_require) => 1
            (values) => Array
                (
                    (0) => Array
                        (
                            (title) => yellowdiamond_fancyintense
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 0
                            (is_delete) => 0
                        )

                    (1) => Array
                        (
                            (title) => yellowdiamond_fancyyellow
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 1
                            (is_delete) => 0
                        )

                    (2) => Array
                        (
                            (title) => yellowdiamond_fanncy
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 2
                            (is_delete) => 0
                        )

                    (3) => Array
                        (
                            (title) => yellowdiamond_light
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 3
                            (is_delete) => 0
                        )

                )

        )

    (2) => Array
        (
            (sort_order) => 2
            (title) => Accent Stone
            (price_type) => fixed
            (price) => 0
            (type) => drop_down
            (is_require) => 1
            (values) => Array
                (
                    (0) => Array
                        (
                            (title) => diamond_ii
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 0
                            (is_delete) => 0
                        )

                    (1) => Array
                        (
                            (title) => diamond_si
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 1
                            (is_delete) => 0
                        )

                    (2) => Array
                        (
                            (title) => diamond_vs
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 2
                            (is_delete) => 0
                        )

                )

        )

    (3) => Array
        (
            (sort_order) => 6
            (title) => Metal
            (price_type) => fixed
            (price) => 0
            (type) => drop_down
            (is_require) => 1
            (values) => Array
                (
                    (0) => Array
                        (
                            (title) => 585_gold_14k
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 0
                            (is_delete) => 0
                        )

                    (1) => Array
                        (
                            (title) => 750_gold_18k
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 1
                            (is_delete) => 0
                        )

                    (2) => Array
                        (
                            (title) => 950_platinum
                            (price) => 0
                            (price_type) => fixed
                            (sku) => 
                            (sort_order) => 2
                            (is_delete) => 0
                        )

                )

        )

)