fix dict_to_array() for non-array sequences