You just need to use "backticks" (the ` on the ~ key) to evaluate the content of the variable parameter in a way that you won't pass more than one variable name. To fix your above example you would do this:
<label>Female <<radiobutton `"$characters." + $charnames[_i] + ".gender"` "female">></label>
<label>Male <<radiobutton `"$characters." + $charnames[_i] + ".gender"` "male">></label>
In the above code, this part:
`"$characters." + $charnames[_i] + ".gender"`
when run will be evaluated as something like this:
"$characters.Jean.gender"
which is known as "dot notation" for object properties.
If you have any names with Unicode characters or symbols other than _ and $ in them, then you may want to use this format instead:
`"$characters['" + $charnames[_i] + "'].gender"`
which when run would be evaluated as something like this:
"$characters['Jean'].gender"
which is known as "bracket notation" for object properties. "Dot notation" is generally shorter to type and easier to read, however "bracket notation" allows for more complicated property names and (normally) variables.
For more information see the "Passing an expression as an argument" section of the SugarCube documentation.
Hope that helps! :-)