Cast values to array