Amazon and Walmart are competing across advertising, technology, memberships and data-driven services as both companies seek new growth.