Ordering posts by an array

This is not possible with native API and you will probably have a rather bad time hacking up SQL for it.

This would be quite trivial to re–sort posts like this after they are retrieved with PHP code. if you use get_posts() you get array you manipulate already and for a WP_Query object array of results is available in public $posts property.

Note this assumes you don’t need to paginate this query. In which case things get very messy very fast and back to the mountain of custom SQL.