Reply to myself > pack it in ulongs with the index in the lower bits and the value in > the upper bits. My solution is about the same as frits' solution but without the extra type or function calls, but with a big does of WTHuuu...