Opportunistic Data Structures with Applications