Phase-field modeling of crystalline nanostructures formed by vapor-liquid-solid growth and liquid metal dealloying