[BUGIFX] Performance issue with big arrays

Avoid in_array function call in StoreData() because it is a huge
performance flaw when syncing big data sets.

Resolves: #60445
Releases: 2.3
Change-Id: I0f320e84da8e1c31fba944ae94a64f87ef5b67ce
Reviewed-on: http://review.typo3.org/31914
Reviewed-by: Francois Suter <francois@typo3.org>
Tested-by: Francois Suter <francois@typo3.org>