Use the builtin symmetric indexing function with a table
>

$t\u2254\mathrm{table}\left(\mathrm{symmetric}\right)\:$

>

${t}_{1\,2}\u22541$

${{t}}_{{1}{,}{2}}{\u2254}{1}$
 (1) 
Define a custom indexing function infinity and use it.
>

`index/infinity` := proc(Idx::list,Tbl::table,Entry::list)
if (nargs = 2) then
if assigned(Tbl[op(Idx)]) then Tbl[op(Idx)];
else infinity;
end if;
elif Entry = [infinity] then
infinity;
else
Tbl[op(Idx)] := op(Entry);
end if;
end proc:

>

$t\u2254\mathrm{table}\left(\mathrm{\∞}\right)\:$

>

${t}_{1\,2}\u22541\:$

Use the builtin indexing function symmetric together with the custom one defined earlier.
>

$t\u2254\mathrm{table}\left(\mathrm{symmetric}\,\mathrm{\∞}\right)\:$

>

${t}_{1\,2}\u22541$

${{t}}_{{1}{,}{2}}{\u2254}{1}$
 (6) 