The structs aren't modified while being read, shouldn't a class and a struct behave the same in this situation?
No. I think the problem occurs earlier than you think.
In Swift, structs have mutable value semantics and classes have reference semantics. What happens in your code is that:
var array2 = [CustomType](repeating:CustomType(), count:numElements)
This has created a single instance of CustomType which every element of array2 now refers to.
You can probably work out the rest. When you set e.g. array2[index].x = sin(rads) you have updated the x property of that single object, which you'll now see when you read from array2[another_index]. Call it "spooky action at a distance". On the other hand, when you do array1[index] = CustomType(....) you have created a new instance that is not shared.
This is one of those things that is almost cultural and gets embedded in how developers think. In languages like Java that have primarily reference semantics it all seems totally natural once you've been doing it for a few years. But if you're used to value-semantic languages then this is something you'll constantly be tripping over if you have to move to the "other side".
Generally, use structs for everything. Only use a class if you have a very good reason to do so.