Casting array items