The only thing you seem to have misunderstood is what the ArrayList constructor does. new ArrayList(5) does not create an ArrayList with five elements, as opposed to new int[5], which does create an array with five elements (all having the value zero). A newly-created ArrayList is always empty, so any attempt to use [] to set the value of any element will crash, because there are no elements. This is the same behavior as a regular array if you had created an array by saying new int[0] - any attempt to index into it would crash. The only way to get a five-element ArrayList is to either use the constructor that takes a (five-element) collection as a parameter (as @Stilgar and @Kelon showed), or by calling e.g. Add(0) five times. After having done this, you can access x[0], x[1], ..., x[4].
What does new ArrayList(n) do, then? It creates an ArrayList of size zero, but where the internal array that is used to store the values is given the size n, so that we can add n elements before the internal array must be replaced by a bigger one (which takes a little bit of time, which is why you in high-performance scenarios might want to use this constructor if you know how big the list will eventually become).