Densely integrated photonic structures for on-chip signal processing