Unified interface for arbitrary dimension