Self-aligned multilayer spacer matrix for high-density transistor arrays and methods for forming the same