If you make an array locally in a function then it seems to cause a stack overflow if you set the size to ~1000. If you create one globally, AGS doesn't seem to have a problem allocating a 20 million int array, I don't know what the limit is, but you'd probably hit the limits of system memory first (the 20 million int array made my game use 118mb ram, but it ran fine).