Small cubicles within a vihara had &amp;quot;beds&amp;quot; like these carved out of the mountain rock .