Creating Bundles Using Function

According to the documentation when creating an bundle I need to Create a Parent bundle product and add component_reference, component_quantities and price_adjustments in the metafield of the parent bundle.

Similarly I need to define the bundle on child product variants metafields. But doing this how can include a variant(child) for multiple bundle(parent) because the space is already occupied with the previously created bundles data.

For example this screenshot is from a bundles child variant: