Consume the get_valid_archs() API from several files.

Try to get rid of hardcoded lists in the codebase, this will
hopefully result in less bugs and maintenance effort.