Declade sed_tmp and regex_tmp as arrays.  Change _dwim_data_(sed|regex|exitstatus) from associate arrays to arrays.