Boolean Array type and Integer type data conversion

Is there a function to convert a boolean array tag into an integer typa tag? and the other way around, is there a way to convert a integer type tag into a boolean array type tag?
I use it in the tagEvent -> Value Changed, here i run the script to assign an Integer to a Boolean Array type tag (memory tag)
I also use it in the tagEvent -> Value Changed, here i run the script to assign an boolean array type tag value to a Integer type tag (OPC tag)
In the scripts, i need to do the conversion.
Thanks for help