How can I convert inInt[] to inShort[]?
You have to create an array of shorts of the appropriate size, and copy the contents. While there are utility methods for copying arrays, I'm not aware of any that will copy an array of primitives and convert values at the same time. So you most likely need to do the element copying with an explicit for
loop.
Is it necessary to allocate new memory for inShort[] ....
Yes. A new array is required ... unless you have an existing array of the right type and size ready to re-use.
or there is a way through which I can cast to inInt[]?
No. You can't cast an array-of-primitive type to a different array-of-primitive type. The Java language won't allow it.
(And for the record, this applies to each and every Java array-of-primitive type.)