Initialize memory objects alongside initializing their array