An associative array is not contiguous array while other arrays are contiguous and by default, the index will start from 0. In an associative array, each data we are writing is associated with the random address & hence array ordering methods are not supported by an associative array.
An associative array associates a key with a value as a set of key/value pairs. Any attempt in sorting the values would break the association. The key is the index value that selects an array element.
The wildcard key is a typeless index. Certain array methods and the foreach loop construct need to return an index value into a variable, and there is no such thing as a typeless variable in SystemVerilog.
Never use the wildcard key [$] as it prevents you from using these other features. Use [int] instead.
The wildcard feature is left over from earlier language (VERA) that was basis for most of SystemVerilog’s verification features. It did not have the concept of type parameters.