Custom plugin configuration field

Hello,

How exactly do you create custom fields? What Im trying to do is get all the shopware payment methods, loop them and for every payment method id a text field would be able to map some value to the payment method id.

What I have currently done:

config.xml

        <component name="payment-method-mapper">
            <name>mappedPaymentMethods</name>
            <entity>payment_method</entity>
            <label>Choose a payment methods for the plugin configuration</label>
        </component>

payment-method-mapper.html.twig

<sw-text-field v-model="$parent.value"></sw-text-field>

Currently Im able to get the all the shopware payment methods and display a text field but writing doesnt save any value. I would also would like to know how would I go about saving as a JSON of the mapped values?