Asset IDs are numbered starting at 0. First are all the sprites and next are sounds. So start at 0, use asset_get_type() and increment until the function returns "asset_sound". Then start filling an array with the IDs as you increment until asset_get_type() no longer returns "asset_sound."