I stayed at a hotel while in New York.

This is not new or colloquial. It is a normal meaning of the words. Here “stay” has meaning 2 in our dictionary (reside, lodge) and “with” has its normal meaning.

When talking about where you stayed (while visiting New York) we would use “at” for a hotel (“at the downtown Hilton”). If instead you “stayed with Barbara” that means you stayed wherever Barbara stayed.

Most often, this means Barbara lives there and you stayed in her house or apartment. That is so commonly said that we don’t give more context; we just say “stayed with Barbara” and it implies that Barbara lives there.

But it is the standard meaning of “with”, so it could mean something different. For example:

“I visited New York for three days. My friend Barbara was there for a week, and her hotel room had two beds. So I stayed with Barbara.” That would mean you shared her hotel room.