An int is a single value whereas an Array can contain multiple values. That does not match. You can get the length of an Array with
somearray.size() or you can access a single array element by index with i.e.
someint = somearray
If I didn't understand you correctly then provide more details.
If you want to convert a String to an Array then you can use the split functions of the String class:
You can convert to string arrays. Godot will implicitly convert the values to integer when used in contexts like calculations (but will run on an error if the value is not a number).
If you want to store/retrieve a number of different values in/from text files then it'd be best to use JSON which allows to parse an entire dictionary with arrays/values/dictionaries from a string or to encode it to a string.