I've created a "global" ajax-modal-function that sends ajax-requests with values stored in data-array at the parent #modal-content. 
That's how a HTML field looks like (as an example):
<input data-array='data[]' name='gender' type='radio' value='1' /> 
<input data-array="data[]" type="password" name="password" />
That's how I store the data before I use tha $.ajax JQuery function to get all the data of every input field of the current modal:
var data_array = $('#modal-content').find('*[data-array]').map(function(idx, elem) {    
    return elem.value.trim(); 
}).get();
Then the $.ajax function looks like this:
$.ajax({
    type: "POST", url: "ajax_modal.php", dataType: "json",
    data: { 
        data: data_array, 
        data_case: data_case, 
        id: id, 
        uid: uid, 
        dataString: 'modal_save' 
    },
    success: function(data) {
So the array is stored in data_array and it works fine. 
But now I have this radio input field or a checkbox. How can I get the value in my array to store its value depending on if the user clicked it or not?
 
     
    