[dev] Simplify conversion of variables to arrays

Typecast to array instead of checking if input type is array and doing
manual conversion.