(I wrote my answer as a comment above. Sorry. Here it is as a formal answer.)
Of course, even if a solution does not appear to use a loop as seen in the Matlab program code, there will be a loop in the ultimapte machine code anyway. Not having a code in the Matlab program can improve legibility of the text for humans, but it is not obvious that it improves the speed of execusion.
Anyway, here is a solution:
idx = logical([0 1 0; 0 0 1; 1 0 0; 1 0 0; 0 1 0]);
vec = ["A","B","C"];
tempvec = repmat(vec', [size(idx',2), 1]);
tempidx = idx'; tempidx = tempidx(:);
result = tempvec(tempidx)'