do typecasting for integer arrays