okay, so the cat function does not work in this case but the vertcat sure did. Just added a little if loop in this
arr_test=[];
tss=[];
for k=1:numel(stats)
idx_test=stats(k).PixelIdxList;
Pixels_in_region_test=a_connected(idx_test);
if k==1
arr_test=[idx_test,Pixels_in_region_test]
else
tss=[idx_test,Pixels_in_region_test]
arr_test=vertcat(arr_test,tss)
end
end