First remark: if your array list has a fixed size (the 111 limit of the loop), you should use classical array instead, it will be more efficient (faster, smaller) and you won't have cast problems...
If actually it is dynamic, read on!
Second remark: in
ArrayList page there is a comment (easy to overlook!): "
An ArrayList doesn't know what it is storing so we have to cast the object coming out"
In clear, yes, ArrayList stores only Objects, ie. undefined blobs of data, without knowing what they really are.
In the Java 1.4 days, you would have get an error by doing al.put(integerVar); because put() wants an object.
With Java 1.5+, the compiler automatically wraps (auto-boxing) the primitive value in the corresponding object, here Integer.
Should we be using 1.5 syntax in Processing, we would have declared ArrayList<Integer> and we could have used int with put() and get() because of the autoboxing.
We cannot, so we have to cast the result of get() to Integer then use intValue() to have the final value:
Integer io = (Integer) agents[1].positions.get(i);
values_x = io.intValue();