You could try with 4 seperate arrays:
[code]
@va = array(123451,1214,6326);
@vb = array(4362,62,34737);
@vc = array(1515,1231,2626);
@vd = array(2752,1257,2579);
[/code]
Then build a specific if-block for each array, effectively copying the code fom the initial post 4 times.
Storages do work across multiple items, that is the "ao" part of the types.
As for showing capital letters, I suggest echo'ing out from the @content for now.