Added prototype as_scalar method in array