Cast to array