The memory you are writing to exists, but it is not occupied by your array.
Basically
test[30] = ...;
means write to the memory located at the pointer to 'test' + 30.
However there is a catch. While you can write to that memory, you can't guarantee that that memory is not occupied by something else. Generally out of bounds access tends to lead to memory corruption and possibly stack corruption which would cause the processor to crash and reset back to the start of the program.