Revert "Array opt"

This reverts commit ac1ef6cb92b15706140487f94a45a001e70fda81.
Revert "Revert "Array opt""

This reverts commit f80043fdf1eededb13ca89e86d4a57a3f439ab32.