Better handle hash and array values in radio buttons and checkboxes