Where and how to store data

How to separate data and indexes in different directory?

From mongo documentation
mongod --storageEngine wiredTiger --wiredTigerDirectoryForIndexes

When you start mongod with --wiredTigerDirectoryForIndexes, mongod stores indexes and collections in separate subdirectories under the data (i.e. --dbpath) directory. Specifically, mongod stores the indexes in a subdirectory named index and the collection data in a subdirectory named collection.