In GNU bash, version 4.4.18(1)-release (x86_64-pc-linux-gnu), the first line of the documentation for readarray / mapfile states:
Read lines from the standard input ... However, it doesn't seem to accept input from a pipe. It would be helpful to note that. -- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0