I'd extract this into a new method to retrieve the current array_type, making `set_values` shorter.