Structure in the array is usually better; you should use that unless you have a reason to use the other form.
From a code correctness point of view, you should handle malloc() fails. If you have 1000 malloc()s in a loop, you're more likely to make a programming error in your error-handling code. Similarly, if your data structure is more complex you're more likely to leak something. So the single malloc() is easier.
From a allocation speed point of view, malloc() obviously takes time to run, so a single malloc() will usually be faster.
From a memory size point of view, malloc() usually has some overhead on each allocation. And obviously the pointers are an extra cost. So if you allocate 1000 16-byte structures, you might end up with 16 bytes per structure in malloc overhead and an 8-byte pointer, total 40,016 bytes. Doing a single allocation will only take up 8,016 bytes.
From an access speed point of view, the single array is likely to be faster, especially if the structures are small or you read the structures in order. If the structures are small, then several of them will fit in a single cache line so they can be read/written as a group. If you read the structures in order, the CPU is likely to notice the linear access to the big array and preload it into the cache. If you use a pointer array and separate allocations, then the memory layout is more random and neither of these optimizations will work. Also, since you're accessing more data (the pointers), your algorithm will fall out of data cache sooner.
From a memory fragmentation point of view, it depends. If you have large-enough structures (a significant fraction of your total RAM), then you might get into a situation where there's not enough contiguous free memory to allocate a single big array, but there is enough to allocate an array of pointers and the individual structures. (E.g. if you have a 32-bit program on an OS that limits you to 2GB of memory, and your memory allocator has allocated something else half way through the memory, then you can't do a single 1.5GB allocation but you could do 15 100MB allocations). This kind of scenario is rare, because people don't usually work with data that large.