General formalism for angular and phase-encoding multiplexing in holographic image storage